SRL Archive - OSR Help

Exception: Range check error at line 618


weequ

2010-10-01 10:18:25

Error: Exception: Range check error at line 618

This line:
Result := (CountColor(5657343, 80, 367, 230, 377) > 90);

Edit: Result is a boolean ofc.

Wizzup?

2010-10-01 10:25:39

Do you get it every time?

weequ

2010-10-01 10:27:01

Atleast I get it when there is no colors available so CountColor should result 0.

Edit: Maybe I'll try it with findcolors and then check for the length of the tpa.

Wizzup?

2010-10-01 10:49:21

That would be helpful.

weequ

2010-10-01 10:50:32

I found out that it didn't work becouse I didn't do:
SetTargetArray(SmartImageArray, 765,503);

Now it works just fine.

Wizzup?

2010-10-01 10:56:21

Alright. In that case there isn't much we can change in Simba to fix it. The SetTargetArray is a method to read direct memory, and we have no way to actually check is the memory is accessible by us.