[svn2495] Yeek Wayist bug, but really deeper
Posted: Tue Jan 25, 2011 5:00 am
Here is a Lua error captured from the Yeek Wayist. Looking through the psionic code a bit, I think there is a bug in the getGemLevel function. I created and tested a patch in Pastebin to fix the problem (run from game/modules/tome/data/talents/psionic). Basically it removes the redundant definitions of getGemLevel by defining it once in the main psionic.lua file, and also fixes the logical bug in getGemLevel where it fails if there is nothing in INVEN_PSIONIC_FOCUS.
EDIT: Tested the patch, seems to work.
Code: Select all
Lua Error: /data/talents/psionic/projection.lua:24: attempt to index local 'tk_item' (a nil value)
At [C]:-1
At /data/talents/psionic/projection.lua:24 getGemLevel
At /data/talents/psionic/projection.lua:311 do_chargedaura
At /mod/class/Actor.lua:199 useEnergy
At /mod/class/Actor.lua:380
At (tail call):-1
At (tail call):-1
At (tail call):-1
At (tail call):-1
At (tail call):-1
At /mod/class/NPC.lua:47 act
At /engine/GameEnergyBased.lua:73 tick
At /engine/GameTurnBased.lua:44 tick
At /mod/class/Game.lua:622