Serverside lua error
wrefgtzweve opened this issue · comments
We've been getting this serverside Lua error pretty frequently, doesn't seem like a big issue but it's been going on for a while so i might as well report it. I do not know how to replicate it.
[ERROR] lua/vj_base/npc_schedules.lua:155: attempt to call method 'VJ_TASK_IDLE_STAND' (a nil value)
1. RunCode_OnFail - lua/entities/npc_vj_creature_base/init.lua:1451
2. DoRunCode_OnFail - lua/vj_base/npc_schedules.lua:143
3. - lua/vj_base/npc_schedules.lua:155
This bug has been present for a while, it's harmless. Basically Lua is failing to recognize the function at random instances. I have found no way of replicating this, making it extremely difficult to fix (if even possible).
VJ-Base/lua/vj_base/npc_schedules.lua
Line 156 in 6344186
Could be simplified to make sure the error doesn't happen anymore
Setting that there won't change anything, the issue is that Lua thinks self:VJ_TASK_IDLE_STAND()
is nil, a check like this could possibly solve it:
task_chaseEnemy.RunCode_OnFail = function() if self.VJ_TASK_IDLE_STAND then self:VJ_TASK_IDLE_STAND() end end
But this is an ugly solution