SRL Archive - S.M.A.R.T. General and Q/A.

[Error]Define not closed


Dudenow12

2007-12-01 13:41:47

I keep getting a pop up error saying Define not closed. I have been using smart for a little while now and it normally works just fine and when I try to run it now I keep getting the error.

This is what the first part looks like.

{$Define SMART} // This is where I defined SMART. If you don't want to use SMART, take out this line.
{$IfDef SMART} // In the next 3 lines, it will only include SMART.scar if you have defined SMART.
{.include SRL/SRL/Misc/Smart.scar}
{$EndIf}


And the main loop.

begin
{$IfDef SMART}
SmartSetup('se3', False, False);
while not(SmartReady) do Wait(100);
SetTargetDC(SmartGetDC);
if not(LoggedIn) then
while not(SmartGetColor(386, 249) = 65535) do Wait(100);
{$EndIf}
setupsrl;
scriptID:='447';
if not(yourSRLstatsID = '') then SRLID := yourSRLstatsID;
if not(yourSRLstatsPW = '') then SRLPassword := yourSRLstatsPW;
declareplayers;
fwBankers:=DTMFromString('78DA639CC6C8C0B094010C182114C39F3F4C7' +
'0FE7F20609C8D5F0D989E44849A3EC26A008F2810DA');
furnaceDTM:=DTMFromString('78DA6374656460B8CC80029E01B1081003651' +
'8FE03012348CD393435AF5F338841D5800058CD75026A5CF0DB05' +
'56E34E580D00B38F1216');
bar:=DTMFromString('78DA636C67646008026214C0884402E97A20C' +
'B9F809A4A20CB97809A3E20CB87809A2940961B7E3500BC00043B' +
'');
activateclient;
wait(500);
marktime(np);
repeat
if not(loggedin) then loginplayer;
findnormalrandoms;
if lowercase(players[currentplayer].loc)='bank' then bank;
if lowercase(players[currentplayer].loc)='walktofurnace' then walktofurnace;
if lowercase(players[currentplayer].loc)='furnace' then shmelt;
if lowercase(players[currentplayer].loc)='walktobank' then walktobank;
if not(loggedIn) then
begin
writeln('not logged in, next player');
nextplayer(false);
marktime(np);
end;
if timefrommark(np)>1200000 then
begin
if lowercase(players[currentplayer].loc)='bank' then bank;
logout;
nextplayer(true);
marktime(np);
end;
until(false);
end.

[Admin]Please do not double post, if you have more to add to your post, please use the Edit button at the bottom left-hand of your post.

Thank you,
Hobbit[/admin]

I fixed the first problem, because I need and {$EndIF} in my text.scar. But now it doesn't log in properly. But in bobarkantor's post it doesn't say to have {$EndIF}.

Bobarkinator

2007-12-01 21:32:25

{*******************************************************************************
procedure TypeSend(Text: String);
By: Mutant Squirrle
Description: Types text humanlike using random timeing on keys.
*******************************************************************************}

procedure TypeSend(Text: string);
var
i: Integer;
Shift: Boolean;
begin
{$IfDef SMART}
Shift:= True;
i:= 0;
SmartSendKeys(Text + Chr(10));
{$Else}
for i := 1 to Length(Text) do
begin
Shift := (Text[i] = ':') or (Text[i] = '!') or (Text[i] = '+') or
(Text[i] = '?') or (Text[i] = '<') or (Text[i] = '>') or
(Text[i] = '@') or (Text[i] = '#') or (Text[i] = '$') or
(Text[i] = '&') or (Text[i] = '%') or (Text[i] = '*');
if (Text[i] = '_') then
Text[i]:= ' ';
if (Shift) then
begin
KeyDown(VK_Shift);
Wait(5 + Random(20));
end;
TypeByte(GetKeyCode(Text[i]));
if (Shift) then
begin
KeyUp(VK_Shift);
Wait(5 + Random(20));
end;
Wait(50 + Random(120));
end;
Wait(200 + Random(500));
TypeByte(13);
{$EndIf}
end;

Yes, mine ends the define, I get no errors so I don't know what your problem is

Dudenow12

2007-12-03 01:04:22

Oh… I missed the {$EndIf} at the end. I put it right after the {$Else}. Sorry I just read through it too fast, you were right bobarkinator. *bows down*

Bobarkinator

2007-12-04 07:54:05

Lol no problem