SRL Archive - OSR Help

bitmap help please


eFox

2007-10-19 13:46:50

Scar gives me this error when it finds the bitmap i am looking for.

[Runtime Error] : Exception: Access violation at address 004BC4CD in module 'scar.exe'. Read of address 01B6EEAC in line 40 in script C:\Program Files\SCAR 3.12\Scripts\new.scar

40. if(FindBitmapToleranceIn(a, x, y, x-150,y-150,x+150,y+150, 5)) then writeln('found it');

Rikje

2007-10-19 13:58:48

you haven't declare the bitmap. ;)

eFox

2007-10-19 14:01:42

From: rikjess
you haven't declare the bitmap. ;)


a:=LoadBitmap('.\image.bmp');

:(?

Rikje

2007-10-19 14:27:29

uhm… i think you havent read the whole tut :p

go to:
tools –>> picture to string –>> open –>> select the bitmap you want to make –>> put a name in this case thats a –>> click oke.

but i suggest you to read this tut.
http://www.villavu.com/forum/showthread.php?t=9453

eFox

2007-10-19 14:45:13

i did it as it says though :O? (was just using the help file though)


program New;
var
image, x, y: Integer;
begin
image:=LoadBitmap('.\image.bmp');
if(FindBitmapToleranceIn(image, x, y, 100, 100, 200, 200, 5)) then begin
writeln('found it');
end else
writeln('couldnt find it');
FreeBitmap(image);
end.

ok i have fixed it now, thanks for helping

Rikje

2007-10-19 14:52:39

you have loaded it from you're computer.
do this:
tools –>> picture to string –>> open –>> select the bitmap you want to make –>> put a name in this case thats a (or image) –>> click oke.

in the debug box theres a tekst. copy that and put it on the place wheres now standing
image:=

eFox

2007-10-19 16:11:05

yeh i know :P it's only for me! :D!

zetsubouda

2010-11-13 23:51:16

I'm getting the same problem and it's unclear how xFox fixed his problem.
I've attatched my code.


edit:
my error is slightly different.

[Runtime Error] : Exception: Access violation at address 004BC4CD in module 'scar.exe'. Read of address 0220D760 in line 35 in script C:\Documents and Settings\Stuart Taylor\Desktop\Spelunky\SCAR\AutoWhip.scar

Bad Boy JH

2010-11-14 01:55:57

check the dates before you post again on a topic, if you have an error, just post a new thread…