Report Eluna script error:attempt to index global 'spell' (a nil value) in Support Posted May 22, 2022 · Edited May 22, 2022 by Chen Jiang I wrote a logic to use Fire Ball (42833) to trigger the removal of Harvest Soul (28679) that Gothik the Harvester from Naxxramas casts on me. When worldserver.exe is loaded, the command window prints an error: attempt to index global 'spell' (a nil value). Although the code still works, but I hate to see errors. Any idea how to mitigate this error? local function RemoveHarvestSoul(event, player) spell = player:GetCurrentSpell(1) if ((spell:GetEntry() == 42833) and player:HasAura(28679)) then player:RemoveAura(28679) end end RegisterPlayerEvent(5, RemoveHarvestSoul)
Eluna script error:attempt to index global 'spell' (a nil value)
in Support
Posted · Edited by Chen Jiang
I wrote a logic to use Fire Ball (42833) to trigger the removal of Harvest Soul (28679) that Gothik the Harvester from Naxxramas casts on me.
When worldserver.exe is loaded, the command window prints an error: attempt to index global 'spell' (a nil value).
Although the code still works, but I hate to see errors. Any idea how to mitigate this error?