So i feel really stupid having to ask this question, but I have not done lua before and for the life of me can not figure out this error I am getting. The script is literally a direct copy of the basic tutorial script from emudevs youtube video and is below,
Code:
local npcId = 555008
function OnEnterCombat(event, creature, target)
creature:CastSpell(target, 2000, true)
end
function OnLeaveCombat(event, creature)
creature:SendUnitSay("text blah blah", 0)
end
RegisterCreatureEvent(npcId, 1, OnEnterCombat)
RegisterCreatureEvent(npcId, 2, OnLeaveCombat)
the error i get is
Code:
lua: prog.lua:11: attempt to call global 'RegisterCreatureEvent' (a nil value)
stack traceback:
prog.lua:11: in main chunk
[C]: in ?
EDIT: Solved no longer an issue....