ond
Veteran OT User
I don't know much about this.
Here is the console error:
Here is my stupid script:
Help please!
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!