SRL Archive - OSR Help

Identifier expected...


unknownrpg

2012-12-31 05:05:35

procedure CheckInv;

begin
if FindDTM(IronOre, x, y, MIX1, MIY1, MIX2, MIY2) then
repeat SupaHeata;
end; <--- line 87

[Error] C:\Users\—–\Desktop\test.simba(88:1): Identifier expected at line 87
Compiling failed.

:cartman:

superuser

2012-12-31 05:22:20

You are missing until -statement after repeat.

P1ng

2012-12-31 05:57:00

I wouldn't even have the repeat in there at all. I'd just make it if FindDTM then Superheat;

rj

2012-12-31 11:42:18

From: P1ng
I wouldn't even have the repeat in there at all. I'd just make it if FindDTM then Superheat;


The repeat procedure hes doing is prolly just a wait.

OP:

Try this:

begin
if FindDTM(IronOre, x, y, MIX1, MIY1, MIX2, MIY2) then
repeat SupaHeata;
until (FindDTM(IronOre, x, y, MIX1, MIY1, MIX2, MIY2)=false)
end;

unknownrpg

2012-12-31 16:21:37

From: rjj95
The repeat procedure hes doing is prolly just a wait.

OP:

Try this:

begin
if FindDTM(IronOre, x, y, MIX1, MIY1, MIX2, MIY2) then
repeat SupaHeata;
until (FindDTM(IronOre, x, y, MIX1, MIY1, MIX2, MIY2)=false)
end;


wooo! this worked ty =) id like to ask 1 more question plz

program SupaHeata;
{$I SRL/SRL.SIMBA}

var
x,y,IronOre,Coal,Bag: Integer;

procedure Ore;

begin

SetupSRL;
ActivateClient;

Coal := DTMFromString('m6wAAAHic42ZgYBAAYkkgloZiUagYJxTDABMQswAxMxCzAzE3EHNB1QpC+TxAzApVr6giwUALwEgCRgIAAJ8BbA==');
Bag := DTMFromString('m1gAAAHic42JgYOAEYi4gFgBiESjmA2J2BghgBGJWIBaE8mFqxYFYGoolgJgfatac0iAGYoAkUaog9hODEQAAd2ACnw==');
IronOre := DTMFromString('m6wAAAHic42ZgYFjByMAwC4hnQPFCKAaJrwXizVC8EYjvANXfAOK7QPwEiB8D8UsgfgHEj6D8+0B8G4gNZQQYaAEYScBIAABw+hFH');

begin
if FindDTM(Coal, x, y, MBX1, MBY1, MBX2, MBY2) then
WriteLn('Yes! we have Coal!');
MMouse(x, y, 5, 5);
if IsUpText('Coal') then
Wait(RandomRange(400, 500));
Mouse(x, y, 0, 0, false);
Wait(RandomRange(400, 500));
Mouse(447, 235, 17, 3, true);
end;

begin
if FindDTM(Bag, x, y, MIX1, MIY1, MIX2, MIY2) then
WriteLn('Dungeoneering blows!');
MMouse(x, y, 5, 5);
if IsUpText('bag') then
Wait(RandomRange(400, 500));
Mouse(x, y, 0, 0, False);
Wait(RandomRange(400, 500));
Mouse(621, 305, 17, 3, true);
FreeDTM(Bag);
end;

begin
if FindDTM(IronOre, x, y, MBX1, MBY1, MBX2, MBY2) then
WriteLn('Yes! we have iron ore!');
MMouse(x, y, 5, 5);
if IsUpText('Iron') then
Wait(RandomRange(400, 500));
Mouse(x, y, 0, 0, False);
Wait(RandomRange(400, 500));
Mouse(400, 210, 17, 3, true);
FreeDTM(IronOre);
end;

begin
if FindDTM(Coal, x, y, MBX1, MBY1, MBX2, MBY2) then
WriteLn('Yes! we have Coal!');
MMouse(x, y, 5, 5);
if IsUpText('Coal') then
Wait(RandomRange(400, 500));
Mouse(x, y, 0, 0, false);
Wait(RandomRange(400, 500));
Mouse(447, 235, 17, 3, true);
FreeDTM(Coal);
Mouse(488, 55, 1, 1, true)
Wait(RandomRange(1000, 1500));
end;
end;

procedure SupaHeata;

begin

IronOre := DTMFromString('m6wAAAHic42ZgYFjByMAwC4hnQPFCKAaJrwXizVC8EYjvANXfAOK7QPwEiB8D8UsgfgHEj6D8+0B8G4gNZQQYaAEYScBIAABw+hFH');

if FindDTM(IronOre, x, y, MIX1, MIY1, MIX2, MIY2) then
WriteLn('Im busy Supaheatin');
MMouse(x, y, 0, 0);
SendKeys('1', 100, 100);
Mouse(x, y, 0, 0, true);
Wait(RandomRange(1200, 1250));
end;

procedure CheckInv;

begin
if FindDTM(IronOre, x, y, MIX1, MIY1, MIX2, MIY2) then
repeat SupaHeata;
until (FindDTM(IronOre, x, y, MIX1, MIY1, MIX2, MIY2)=false)
end;









begin
Ore;
SupaHeata;
CheckInv;
end.

alright so this is what ive written so far
the code is a little excessive for what it actually does but this is because certain functions will not work with my simba for some reason such as chooseoption clickmouse2 closebank and more so i have to use older functions, ive tried reinstalling simba over n over n installing smart v8.0 but im not able to compile smart currently because winGW will not install propperly for some reason but anyways

so currently the scripts superheats every ore in inv by moving to it i need to incorporate a mousebox onto invslot 19 so that the mouse just clicks that ore till complete but im not quite sure how to incorporate

thanks to p1ng n superuser aswell

The Killer

2012-12-31 18:34:48

err think you've made a mistake^
1) too many begins :p
2) When you use if … then, if you want to do multiply lines afterwards you must do begin end
begin
if FindDTM(Coal, x, y, MBX1, MBY1, MBX2, MBY2) then
begin //here
WriteLn('Yes! we have Coal!'); //i think you want to do this line
MMouse(x, y, 5, 5); //this line
if IsUpText('Coal') then //and this line so you do begin end if u see what i'm saying
begin
Wait(RandomRange(400, 500));
Mouse(x, y, 0, 0, false);
Wait(RandomRange(400, 500));
Mouse(447, 235, 17, 3, true);
end;
end;
end;

begin //here, you do not need this begin.
if FindDTM(Bag, x, y, MIX1, MIY1, MIX2, MIY2) then
WriteLn('Dungeoneering blows!');
MMouse(x, y, 5, 5);
if IsUpText('bag') then
Wait(RandomRange(400, 500));
Mouse(x, y, 0, 0, False);
Wait(RandomRange(400, 500));
Mouse(621, 305, 17, 3, true);
FreeDTM(Bag);
end;

unknownrpg

2013-01-01 21:36:44

From: The Killer
err think you've made a mistake^
1) too many begins :p
2) When you use if … then, if you want to do multiply lines afterwards you must do begin end
begin
if FindDTM(Coal, x, y, MBX1, MBY1, MBX2, MBY2) then
begin //here
WriteLn('Yes! we have Coal!'); //i think you want to do this line
MMouse(x, y, 5, 5); //this line
if IsUpText('Coal') then //and this line so you do begin end if u see what i'm saying
begin
Wait(RandomRange(400, 500));
Mouse(x, y, 0, 0, false);
Wait(RandomRange(400, 500));
Mouse(447, 235, 17, 3, true);
end;
end;
end;

begin //here, you do not need this begin.
if FindDTM(Bag, x, y, MIX1, MIY1, MIX2, MIY2) then
WriteLn('Dungeoneering blows!');
MMouse(x, y, 5, 5);
if IsUpText('bag') then
Wait(RandomRange(400, 500));
Mouse(x, y, 0, 0, False);
Wait(RandomRange(400, 500));
Mouse(621, 305, 17, 3, true);
FreeDTM(Bag);
end;


o ok ty