SRL Archive - Help and Support

Identifier?


faster789

2008-04-24 20:57:20

hey members,
you might notice after this thread I'll be posting couple of threads so you guys can assist me with upgrading my bannable script. :( yes it banned 2 accs, my apologies.

I am currently changing a part of my script but I keep getting an identifier error when it shouldn't occur because I have case this is the part please chek thanks!


procedure SoftenClay;
begin
Clay := DTMFromString('78DA63CC62626078C18002167646331801694' +
'620FE0F048CB94035F719D000231209A44B806A9E1250930D54F3' +
'86809A64A09AE7F8D50000123D0C64');
SoftClay := DTMFromString('78DA637464626078C28002B20378198C80342' +
'310FF070246909ADB0C6880118904D2DE40352F09A87101AA794F' +
'408D0D116ACC31DD8CAE0600F0460C02');
if (not(LoggedIn)) then Exit;
if not FindDTM(BucketDDTM, x, y, mix1, miy1, mix2, miy2) then
begin
Writeln('couldnt find bucket for weird reason..');
NextPlayer(false);
end else
begin
Mouse(x,y,2,2,True);
Myrandom;
end;
if not FindDTM(Clay, x, y, mix1, miy1, mix2, miy2)then
begin
writeln('couldnt find clay');
NextPlayer(false);
end else
begin
case Random(2) of
0: begin
Wait(100 +random(50));
if FindDTM(Clay, x, y, mix1, miy1, mix2, miy2)then
begin
Mouse(x,y,2,2,True);
end;
end;
end;
end;
1: begin
Wait(100 +random(50));
if FindDTM(Clay, x, y, mix1, miy1, mix2, miy2)then
Mouse(x,y,2,2,False);
ChooseOption('lay');
end;
end;
end;
begin
Wait(1500 +random(150));
ClickClay;
end;
end;
end;
why I think theres a problem is that do you notice how many ends there are after case 0? shouldnt these ends come after case 1?

edit: yes btw the identifier is asking for it to be after he ends after case 0.

Method

2008-04-24 21:13:48

Let me know if I made any errors. It should be something more like this, I'd think:

procedure SoftenClay;
begin
Clay := DTMFromString('78DA63CC62626078C18002167646331801694' +
'620FE0F048CB94035F719D000231209A44B806A9E1250930D54F3' +
'86809A64A09AE7F8D50000123D0C64');
SoftClay := DTMFromString('78DA637464626078C28002B20378198C80342' +
'310FF070246909ADB0C6880118904D2DE40352F09A87101AA794F' +
'408D0D116ACC31DD8CAE0600F0460C02');
if (not(LoggedIn)) then Exit;
if not FindDTM(BucketDDTM, x, y, mix1, miy1, mix2, miy2) then
begin
Writeln('couldnt find bucket for weird reason..');
NextPlayer(false);
end else
begin
Mouse(x,y,2,2,True);
Myrandom;
end;
if not FindDTM(Clay, x, y, mix1, miy1, mix2, miy2)then
begin
writeln('couldnt find clay');
NextPlayer(false);
end else
case Random(2) of
0: begin
Wait(100 +random(50));
if FindDTM(Clay, x, y, mix1, miy1, mix2, miy2)then
Mouse(x,y,2,2,True);
end;
1: begin
Wait(100 +random(50));
if FindDTM(Clay, x, y, mix1, miy1, mix2, miy2)then
begin
Mouse(x,y,2,2,False);
ChooseOption('lay');
end;
end;
end;
Wait(1500 +random(150));
ClickClay;
end;