Code center > Solved Bugs

Poison bug.

<< < (3/8) > >>

Testlund:
Then I have to wait for another crash, right?

PurpleYouko:
did that fix it? :blink:

It shouldn't have made any difference.


--- Code: ---If rob(n).poison > power Then 'create poison shot
   createshot Shots(t).x, Shots(t).why, vx, vy, -5, n, power, range, vbYellow
   rob(n).Waste = rob(n).Waste + (power * 0.1)
   rob(n).poison = rob(n).poison - (power * 0.9)
   If rob(n).poison < 0 Then rob(n).poison = 0
   rob(n).mem(poison) = rob(n).poison
Else ' create energy shot
--- End code ---

as you can see with the line..


--- Code: ---rob(n).poison = rob(n).poison - (power * 0.9)
--- End code ---
rob(n).poison is reduced by a value equal to 0.9 time power.

If power is big then it should be reduced more

I suspect that power is actually negative since poison has increased.

That should NOT be able to happen.

PurpleYouko:

--- Quote ---Then I have to wait for another crash, right?
--- End quote ---
'fraid so.
Once it crashes then you can do all kinds of stuff.
When it's happily running you are effectively shafted as far as debugging goes.

That is precisely the problem that Num and I have been up against for so long.

Numsgil:
I've had to just leave it running over night.  The problem is that interesting simulations tend to have all the bots die from time to time...

Testlund:
No, I mean the above fix I put in was for the crash you had recently. I just read about it and put it into the subroutine I posted above. I thought that was related to this issue.

So... If I crash next time at the same location you want the hovering info from THIS code instead?

rob(n).poison = rob(n).poison - (power * 0.9)

Is that what you mean?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version