Ravauvial
Member
A good thread name: Healing Orb Error in movements
Distro name: Forgotten Server 8.4 (Crying Damson)
Script type: Healing Orb Lua
MoveEvent
Lua Function: doTeleportThing I think
Description of the script: Healing Orb is Item: 2180 when you walk through it it heals you.
What it should do: Heal you and it does but
Errors (in console) :
Lua Script Error: [MoveEvents Interface]
data/movements/scripts/healingorb.lua: onStepIn
attempt to index a nil value
stack traceback:
[C]: in function 'doTeleportThing'
data/movements/scripts/healingorb.lua:7: in function
<data/movements/scripts/healingorb.lua:1>
My code:
Distro name: Forgotten Server 8.4 (Crying Damson)
Script type: Healing Orb Lua
MoveEvent
Lua Function: doTeleportThing I think
Description of the script: Healing Orb is Item: 2180 when you walk through it it heals you.
What it should do: Heal you and it does but
Errors (in console) :
Lua Script Error: [MoveEvents Interface]
data/movements/scripts/healingorb.lua: onStepIn
attempt to index a nil value
stack traceback:
[C]: in function 'doTeleportThing'
data/movements/scripts/healingorb.lua:7: in function
<data/movements/scripts/healingorb.lua:1>
My code:
Code:
function onStepIn(cid, item, pos)
if item.itemid == 2180 and item.uid == 5002 then
if getPlayerStorageValue(cid, 64553) ~= 1 then
doCreatureAddHealth(cid, 500)
doCreatureAddMana(cid, 1500)
doSendMagicEffect(getCreaturePosition(cid), 12)
doTeleportThing(cid, fromPosition, TRUE)
setPlayerStorageValue(cid,64553,1)
end
end
end