SRL Archive - Bugs

Is this a bug or just my scripting?


Function

2010-01-24 01:33:11

Bored as hell messing around in paint.
I don't know if this is an error or just something in my code…
program new;

procedure CountColors;
var
x, y, i: integer;
Colors: Array[0..2] of TPointArray;

begin
GetClientDimensions( x, y );

{Line 11} if( FindColors( Colors[ 0 ], 0, 0, 0, x, y ) )then
if( FindColors( Colors[ 1 ], 2366701, 0, 0, x, y ) )then
if( FindColors( Colors[ 2 ], 62207, 0, 0, x, y ) )then

for i := 0 to 2 do
writeln( Length( Colors[ i ] ) );

end;
begin
CountColors;
end.

Error: Exception: Any Find Function, you did not pass a correct xe: 1220. at line 11

YoHoJo

2010-01-24 01:36:34

Compiles for me, but the code looks weird…
Successfully executed
Successfully compiled (69 ms)
Successfully executed

What are you trying to do exactly?

Function

2010-01-24 01:45:07

From: YoHoJo
Compiles for me, but the code looks weird…
Successfully executed
Successfully compiled (69 ms)
Successfully executed

What are you trying to do exactly?


Just messing around I was trying to see how Simba counted colors actually like by pixel or what but I get that wierd expecting error

YoHoJo

2010-01-24 01:48:09

Oh on simba, I compiled it on SCAR, no wonder I haven't seen that error before. :) Not sure dude.

Function

2010-01-24 01:58:02

From: YoHoJo
Oh on simba, I compiled it on SCAR, no wonder I haven't seen that error before. :) Not sure dude.


:P Just wondering if its an error don't really know what that means

Kyle Undefined

2010-01-24 02:15:09

Have you tried taking out all of those spaces or does that not matter?

~Camo

Widget

2010-01-24 03:03:27

program new;

procedure CountColors;
var
x, y, i: integer;
Colors: Array[0..2] of TPointArray;

begin
GetClientDimensions( x, y );
x := x - 1;
y := y - 1;

{Line 11} if( FindColors( Colors[ 0 ], 0, 0, 0, x, y ) )then
if( FindColors( Colors[ 1 ], 2366701, 0, 0, x, y ) )then
if( FindColors( Colors[ 2 ], 62207, 0, 0, x, y ) )then

for i := 0 to 2 do
writeln( Length( Colors[ i ] ) );

end;
begin
CountColors;
end.

Edit: Nevermind. The pixel grid starts at 0, so the last row/column would be the width/height minus one

Wizzup?

2010-01-24 06:12:44

What Widget posted should work. You are searching out of the client's bounds, by one pixel. ;)
You'll see that Simba warns you more often about things that may or are going wrong. :)

Widget

2010-01-24 16:00:38

I do think this "Error" only merits a Warning to the user though, and maybe a helpful tip of how far off the screen they're trying to look :)