SRL Archive - SRL Bugs

Strange WindMouse bug,


weequ

2011-11-01 11:38:43

Error: divide by Zero at line 53
mouse.scar was opened in a new tab and line 53 highlighted.

Line 53:
windY:= windY / sqrt2;

Earlier in the script: (line 39)
sqrt2:= sqrt(2);


How is this bug even possible? To make it even stranger I'm gonna tell you that line 52 is this:
windX:= windX / sqrt2;

This has only happened to me once and I have no-idea why.



Edit: Got another error same line:
Math error at line 53

Coh3n

2011-12-01 22:04:11

I'm curious. Have you gotten this error anymore since the thread was made?

weequ

2011-12-01 22:08:19

Err I think I got it once like the following day but not after that. (Haven't botted in a while though)

Is this bug a "Memory leak"?

Kave

2011-12-01 22:18:44

I've had this error before as well.

euphemism

2011-12-01 22:26:06

Wasn't this brought up a month or two ago? What could be causing that? The square root of two is not zero.

Coh3n

2011-12-02 00:18:29

From: weequ
Err I think I got it once like the following day but not after that. (Haven't botted in a while though)

Is this bug a "Memory leak"?
I don't think so, but I can't even begin to narrow down what would have caused it.

Nava2

2011-12-02 01:07:17

PascalScript error perhaps?

Coh3n

2012-01-02 14:10:27

I've got this the last two times I've run one of my scripts. Access violation on these lines in WindMouse:

sqrt2:= sqrt(2);

if hypot(veloX, veloY) > maxStep then
It's really, really annoying.

I wonder if wrapping WindMouse in a try..except would help..

E: Try..except stopped it. I've committed to my repository and I'll push to main the next time I make an update.