SRL Archive - Help and Support

Help With New Function;


Cheesehunk

2006-05-04 19:23:22

I am starting a new function, and I think I am making a simple mistake, help would be appreciated!

Procedure CheckChats;
{.include SRL/SRL.scar}
var Chat1, Chat2, Chat3: string;
var Scroll1X, Scroll1Y: integer;
var Scroll2X, Scroll2Y: integer;
var Scroll3X, Scroll3Y: integer;
begin
if(FindColorEllipse(Scroll1X,Scroll1Y,65280,100,35,495,57,487)) then
begin
Chat2=('on')
end;
begin
if(FindColorEllipse(Scroll1X,Scroll1Y,65535,100,35,495,57,487)) then
begin
Chat1=('friends')
end;
end;
end.

Error:
Line 10: [Error] (18:1): 'BEGIN' expected in script C:\Program Files\SCAR 2.03\includes\srl\srl\core\Globals.scar

Thanks,
Cheesehunk.

driger1592

2006-05-04 19:38:31

{.include SRL/SRL.scar}

Procedure CheckChats;
var Chat1, Chat2, Chat3: string;
Scroll1X, Scroll1Y: integer;
Scroll2X, Scroll2Y: integer;
Scroll3X, Scroll3Y: integer;
begin
if(FindColorEllipse(Scroll1X,Scroll1Y,65280,100,35,495,57,487)) then
begin
Chat2 := 'on';
end;
begin
if(FindColorEllipse(Scroll1X,Scroll1Y,65535,100,35,495,57,487)) then
begin
Chat1 := 'friends';
end;
end;
end;
Had to declare the include before you made the procedure, and you set your strings the wrong way. All fixed ;) Please take the time to review what I did :p It helps :p

Cheesehunk

2006-05-04 20:03:40

Thanks, I knew it was a simple mistake:p

My bad.