hmm.... I got an error using latest version on level 4, against a swamp slime monster - was punching him... and when he shot some slime all closed and error presented:
Lua Function poison_slime.on_impact: base/damage.lua:377: attempt to perform arithmetic on local 'range' (a nil value)
(fixed) Lua error in poison_impact
Moderator: Sophia
Forum rules
Please read the Forum rules and policies before posting. You may
to help finance the hosting costs of this forum.
Please read the Forum rules and policies before posting. You may

- Sophia
- Concise and Honest
- Posts: 4306
- Joined: Thu Sep 12, 2002 9:50 pm
- Location: Nowhere in particular
- Contact:
Re: (fixed) Lua error in poison_impact
Oops. Fixed now. 
If you want to keep playing, you can fix this yourself, too:
Around line 377 of damage.lua you'll find a function called poison_impact. However, immediately above that, you'll find another shorter function called poison_impact, taking less parameters. Two functions with the same name is what is creating the problem.
Change this line:to this:
Then, lower down, early in the second poison_impact, look for some code that looks like:and change that to:Everything will work wonderfully, then. 

If you want to keep playing, you can fix this yourself, too:
Around line 377 of damage.lua you'll find a function called poison_impact. However, immediately above that, you'll find another shorter function called poison_impact, taking less parameters. Two functions with the same name is what is creating the problem.
Change this line:
Code: Select all
function poison_impact(hit_ppos, poi)
Code: Select all
function player_poison_impact(hit_ppos, poi)
Code: Select all
if (hit_ppos) then
poison_impact(hit_ppos, poi)
end
Code: Select all
if (hit_ppos) then
player_poison_impact(hit_ppos, poi)
end

- Gambit37
- Should eat more pies
- Posts: 13770
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
Re: (fixed) Lua error in poison_impact
This is so cool that simple bugs can be fixed locally by us!