Page 1 of 1
(fixed) Ai bugs
Posted: Mon Dec 24, 2012 4:28 pm
by Joramun
Code: Select all
FATAL LUA ERROR: Lua Function sys_ai_near: base/monster_ai.lua:2640: attempt to perform arithmetic on a nil value
@@@ LUA STACK @@@
[S:base/monster_ai.lua:2640: attempt to perform arithmetic on a nil value]
@@@@@@
I also had the same kind of problems with :
Code: Select all
local delay_len = dsb_ai(boss_id, AI_DELAY_ACTION, QUERY)
returning nil. (With a Deth Armor)
Re: Ai bugs
Posted: Mon Dec 24, 2012 8:10 pm
by Sophia
I'll change those functions to return the actual integer 0 instead of
nil when the value is 0.
Sometimes I kind of dislike that Lua makes a distinction.

Anyway, fixed!
The one consequence of this fix is that a line like
Code: Select all
if (dsb_ai(id, AI_DELAY_ACTION, QUERY))
will now always be
true. It'd need to be rewritten as "if (whatever
> 0)" to work right.