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,
the error i get is
any help would be appreciated :D
Code:
local npcId = 555008
function OnEntercCombat(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)
Code:
lua: prog.lua:11: attempt to call global 'RegisterCreatureEvent' (a nil value)
stack traceback:
prog.lua:11: in main chunk
[C]: in ?