SRL Archive - OSR Help

FindColorSpiral : type mismatch


Fletcher

2012-04-22 17:38:00

I need some help .. I just started scripting yesterday and have been working on a script almost nonstop and now it has an error.

I am trying to use FindColorSpiralTolerance to look for bones but when I compile I get the error "type mismatch". The error is in the first line below.


Also, when is it useful to use the "Exit;" command and what does it do?


if not(FindColorSpiralTolerance(x, y, 14738919, MSX1, MSY1, MSX2, MSY2, 5))then

begin

writeln('No Bones Were Found');
Exit;

end;

else

// pick up bones


Sin

2012-04-22 17:40:40

if not(FindColorSpiralTolerance(x, y, 14738919, MSX1, MSY1, MSX2, MSY2, 5))then

begin

writeln('No Bones Were Found');
Exit;

end else

// pick up bones

Total

2012-04-22 17:45:28

If it says type mismatch it probably means you declared a variable incorrectly(like declaring x as string or something). The Exit command exits the procedure that it is in.

Fletcher

2012-04-22 17:53:47

oh crap, I had the x, y coordinates as extended..

thanks for the fix sin, I would never have found that syntax error on my own.