I am having an issue with a lookup im using to find spells in the spells.lua file.
The lookup seems to stop after ID 511 for some reason, and any spells higher than this are not checked. Code snippet below:
Code
function lookup_spell_id(spell) for k,v in ipairs(res.spells) do windower.add_to_chat(007,k..' '..v.en) if v.en == spell then spell_index = k return end end end
Any ideas on how I can get it to check the entire file?
Edit: Just noticed there is no 512 in the spells.lua, added a dummy to test and it got a bit further. Is there anyway to get the code to continue on if theres a missing entry?