Page 1 of 1

(fixed) Pit damage Bug

Posted: Wed Aug 06, 2008 1:00 am
by Sophia
Paul Stevens (via PM) wrote:Downloaded dsbtest33.zip and the
CSB port.

Got fatal LUA ERROR

Lua function pit.on_trigger: base/triggers.lua;480 attempt to perform arithmetic on global 'damage_amount' (a nil value)

Happened only 30 seconds into the game after running
away from the opening worms.
Line 480 of base/triggers.lua looks something like:

Code: Select all

dsb_set_hp(what, dsb_get_hp(what) - damage_amount)
This bug can be fixed for the time being by adding

Code: Select all

local damage_amount = 20
just above the previous line. That will cause damage_amount to be defined and the game won't error out any more.

I'll have a better fix in DSB 0.34.

Posted: Wed Aug 06, 2008 10:34 am
by Joramun
Hey, cool, someone is actually testing my conversions !

(I expect them to be bug-ridden,
especially the endgame mechanics !!)

Posted: Wed Aug 06, 2008 5:22 pm
by Paul Stevens
J wrote:Hey, cool, someone is actually testing my conversions
OK. So it ain't been tested. So I
figures "What the Hell; I'll give it a whirl".
Got another solid 30 seconds of gametime
under my belt. Went upstairs and met
a mummy. Threw something at them.
This ain't exactly the end-game.
Guess I better save more often :wink:


Lua function sys_base_impact:base/system.lua:60
attempt to call global monster_took_damage (nil)

Posted: Wed Aug 06, 2008 5:28 pm
by Joramun
Erm, the mummy probably tried to play base-ball with you. :lol: :oops:

Posted: Wed Aug 06, 2008 6:58 pm
by Sophia
None of this is Joramun's or CSB's fault. :P :)

It actually has to do with the new "hook" system, and not testing that enough. ;)

I renamed/moved around a bunch of functions and apparently forgot a couple. :oops:

Posted: Thu Aug 07, 2008 9:14 am
by Joramun
Paul Stevens wrote: OK. So it ain't been tested.
Actually, I test almost everything EXCEPT the endgame mechanics of CSB. The DM one is ok.

Posted: Mon Aug 11, 2008 4:50 pm
by ian_scho
Sophia wrote: It actually has to do with the new "hook" system, and not testing that enough. ;)

I renamed/moved around a bunch of functions and apparently forgot a couple. :oops:
Hi. Was function monster_took_damage(...) one of them? You need someone to write you some unit tests :wink: