christiandb
Member
Code:
function onStepIn(cid, item, position, fromPosition)
switch1pos = {x=32310, y=31975, z=13, stackpos=1}
switch2pos = {x=32310, y=31976, z=13, stackpos=1}
switch3pos = {x=32312, y=31975, z=13, stackpos=1}
switch4pos = {x=32312, y=31976, z=13, stackpos=1}
switch5pos = {x=32314, y=31975, z=13, stackpos=1}
switch6pos = {x=32314, y=31976, z=13, stackpos=1}
getswitch1 = getThingfromPos(switch1pos)
getswitch2 = getThingfromPos(switch2pos)
getswitch3 = getThingfromPos(switch3pos)
getswitch4 = getThingfromPos(switch4pos)
getswitch5 = getThingfromPos(switch5pos)
getswitch6 = getThingfromPos(switch6pos)
if item.uid == 7504 and item.itemid == 1397 and getPlayerStorageValue(cid,7500) == 1 and
getswitch1.itemid == 1946 and
getswitch2.itemid == 1946 and
getswitch3.itemid == 1946 and
getswitch4.itemid == 1946 and
getswitch5.itemid == 1945 and
getswitch6.itemid == 1945 then
setPlayerStorageValue(cid,7500,2)
else doPlayerSendCancel(cid,"You don't have completed the required seals or the levers aren't on the right place.")
end
return 1
end
Code:
[05/12/2008 03:20:19] Lua Script Error: [MoveEvents Interface]
[05/12/2008 03:20:20] data/movements/scripts/banshee/banshee2.lua:onStepIn
[05/12/2008 03:20:20] attempt to index a nil value
[05/12/2008 03:20:20] stack traceback:
[05/12/2008 03:20:20] [C]: in function 'getThingfromPos'
[05/12/2008 03:20:20] data/movements/scripts/banshee/banshee2.lua:17: in function <data/movements/scripts/banshee/banshee2.lua:1>
using tfs 0.3 alpha 4.
any idea's why it's bugged?
PS: it is checking levers
Last edited: