Log in

View Full Version : [Error] C:\Users\Thomas\Downloads\BeerBuyer.simba(99:39): Semicolon (';') expected at



King
12-01-2012, 02:15 AM
Function AtBank:Boolean;
Begin
Wait(250+random(50));
if FindBank('vwb') then AtBank :=True;
if not FindBank('vwb') then AtBank :=False;
end;


Gives me the error

[Error] C:\Users\Thomas\Downloads\--------.simba(99:39): Semicolon (';') expected at line 98

What am I doing wrong? I swear this worked like 5 months ago when I did it, having a brain fart :P

Ian
12-01-2012, 02:17 AM
post the script? chances are there's a typo

riwu
12-01-2012, 02:23 AM
You don't assign the function name, assign the result instead.
Result:= True;

Also using 'else' makes it much cleaner/faster.

King
12-01-2012, 02:23 AM
I knew it was something stupid! Thanks mate!

E*
Function AtBank:Boolean;
Begin
Wait(250+random(50));
if FindBank('vwb') then
begin
writeln('At the bank');
Result:=True;
end
else
begin
writeln('We are not at the bank Teleporting to varrock and walking there');
Result:=False;
end;
end;

Changed it to this, working now :P

King
12-01-2012, 05:42 AM
Does anybody know how I would get my script to stop when it finds a NPC chat box? I've used the commands but it still doesnt stop/;

until((FindNPCChatText('What can I do yer for?', nothing)) or (TimeFromMark(t) > 5000));

Ashaman88
12-01-2012, 01:56 PM
maybe try just one word?

The Killer
12-01-2012, 02:07 PM
maybe try just one word?

Yeah do a word from the line that is unique to the chat.
Also may I ask, Where are you making the beer buyer for?
edit: nvm can see its varrock...

King
12-01-2012, 05:05 PM
Yeah do a word from the line that is unique to the chat.
Also may I ask, Where are you making the beer buyer for?
edit: nvm can see its varrock...

Yep:P Just a request ne of my friends made and Ill try that ash!

CRASH_OVERRIDE
12-01-2012, 10:53 PM
"yer" looks good. not many other NPCs in that area say that.

King
12-02-2012, 03:23 AM
Thanks for the help guys :P