• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

LUA Problem [Help]

ond

Veteran OT User
Joined
Mar 24, 2008
Messages
2,782
Solutions
25
Reaction score
491
Location
Sweden
I don't know much about this.

Here is the console error:

Code:
Lua Script Error: [Action Interface]
data/actions/scripts/rook/rat_bridge.lua:onUse

data/actions/scripts/rook/rat_bridge.lua:3: attempt to index global 'peoplepos'
(a nil value)
stack traceback:
data/actions/scripts/rook/rat_bridge.lua:3: in function <data/actions/scripts/rook/rat_bridge.lua:1>

Here is my stupid script:

LUA:
function onUse(cid, item, frompos, item2, topos)

pos1 = {x=peoplepos.x, y=peoplepos.y, z=peoplepos.z, stackpos=253}
pos2 = {x=peoplepos2.x, y=peoplepos2.y, z=peoplepos2.z, stackpos=253}
pos11 = getThingfromPos(peoplepos1)
pos22 = getThingfromPos(peoplepos2)
groundPos1 = {x=32100, y=32205, z=8, stackpos=0}
groundPos2 = {x=32101, y=32205, z=8, stackpos=0}

if people.itemid == 0 then
if item.uid == 1000 and item.itemid == 1945 then
doTransformItem(item.uid,item.itemid+1)
doCreateItem(508,1,groundPos1)
doCreateItem(509,1,groundPos2)
elseif item.uid == 1000 and item.itemid == 1946 then
doTransformItem(item.uid,item.itemid-1)
doCreateItem(1284,1,groundPos1)
doCreateItem(1284,1,groundPos2)
doRemoveItem(groundPos1.uid,1)
doRemoveItem(groundPos2.uid,1)
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
else
pos1.x = peoplePos1.x-1
pos2.x = peoplePos2.x-2
doTeleportThing(people.uid,pos1)
doTeleportThing(people.uid,pos2)
doCreateItem(508,1,groundPos1)
doCreateItem(509,1,groundPos2)
doTransformItem(item.uid,item.itemid-1)
removeTeleport(teleportcreateposition)
end
return 1
end

Help please!
 
Code:
local pos1 = {x=SET X POS, y=SET Y POS, z=SET Z POS, stackpos=253}
local pos2 = {x=SET X POS, y=SET Y POS, z=SET Z POS, stackpos=253}
local pos11 = getThingfromPos(pos1)
local pos22 = getThingfromPos(pos2)

Guess it is clear now

Also, there will be more errors. This script is very bugged, heh. :)
 
Back
Top