DedicatedOT
New Member
Code:
[15/06/2009 21:39:20] data/npc/scripts/pet reviver.lua:onCreatureSay
[15/06/2009 21:39:20] data/npc/scripts/pet reviver.lua:41: attempt to compare nil with number
[15/06/2009 21:39:20] stack traceback:
[15/06/2009 21:39:20] data/npc/scripts/pet reviver.lua:41: in function <data/npc/scripts/pet reviver.lua:39>
Code:
function onCreatureSay(cid, type, msg)
msg = string.lower(msg)
if getDistanceToCreature(cid) < 4 then // line 41
if (msgcontains(msg, 'hi') and (focus == 0)) then
selfSay('Hello ' .. creatureGetName(cid) .. '! I can take you to the train!')
focus = cid
talk_start = os.clock()