SRL Archive - OSR Help

Missing identifier


Liamwitdre

2012-05-31 15:18:42

Function Banking:
begin
SetAngle(SRL_ANGLE_HIGH);
MakeCompass('W');
WriteIn('Banking');
OpenBankChestEdge(SRL_BANK_SW);
repeat
wait(randomrange(49,51));
until(BankScreen or Pinscreen);
If PinScreen then
InPin(Players[CurrentPlayer].Pin);
Mouse(655, 224, 3, 3, false);
ChooseOption('All');
Withdrawl(9, 0, 28);
Wait(randomrange(400,700));
CloseBank;
end;

Missing identifier at line 51 which is the second line of the code, 'begin'. any help would be appreciated.

Recursive

2012-05-31 15:20:15

This is what you are missing on the first line
Function Banking;

You used a colon instead of a semi-colon…

Also a suggestion?

Procedure Banking;
begin
SetAngle(SRL_ANGLE_HIGH);
//MakeCompass('W');
WriteIn('Banking');
If OpenBankChestEdge(SRL_BANK_SW) then
repeat
wait(randomrange(49,51));
until(BankScreen or Pinscreen);
If PinScreen then
InPin(Players[CurrentPlayer].Pin);
Mouse(655, 224, 3, 3, false);
ChooseOption('All');
Withdrawl(9, 0, 28);
Wait(randomrange(400,700));
If invFul then
begin
CloseBank;
end else
Banking;
end;

Liamwitdre

2012-05-31 15:22:45

From: Chig
This is what you are missing on the first line
Function Banking;

You used a colon instead of a semi-colon…


thats a problem I fixed before this one, it asked for a colon. it's the line after which is requiring an indentifier?

Ashaman88

2012-05-31 15:25:33

Procedure Banking;

CephaXz

2012-05-31 15:25:39

Function returns something. It should be something like:

Function Banking :Boolean;

If you're using a procedure, then you can just:

Procedure Banking;

Recursive

2012-05-31 15:27:58

From: Liamwitdre
thats a problem I fixed before this one, it asked for a colon. it's the line after which is requiring an indentifier?


K then make it a boolean function

Function Banking: Boolean;

Then make sure to use result := {true or false};

Liamwitdre

2012-05-31 15:28:14

From: ashaman88
Procedure Banking;


Thankyou that worked now im having a problem at line 54

WriteIn('Banking');

I'm a complete novice to scripting, but im trying my best :p

Recursive

2012-05-31 15:29:08

From: Liamwitdre
Thankyou that worked now im having a problem at line 54

WriteIn('Banking');

I'm a complete novice to scripting, but im trying my best :p



Writeln('Banking');

Means this: WriteLine := 'Bankin'

footballjds

2012-05-31 15:29:14

could you post the entire script?
I'm 99% sure that we're helping this kid get around an anti-leach…

seriously, WriteIn(''); and a function with no var being returned…
looks like anti-leach to me, not a scripting error.

Rich

2012-05-31 15:29:37

Check this tutorial out. It's pretty old but everything is still relevant.


EDIT:

It's WriteLn.

Liamwitdre

2012-05-31 15:34:39

From: Rich
Check this tutorial out. It's pretty out but everything is still relevant.


EDIT:

It's WriteLn.


Thanks for your help, i'll be taking a couple of notes from your tutorial aswell :)

CephaXz

2012-05-31 15:38:52

From: footballjds
could you post the entire script?
I'm 99% sure that we're helping this kid get around an anti-leach…

seriously, WriteIn(''); and a function with no var being returned…
looks like anti-leach to me, not a scripting error.


Now that you said it, that makes sense :cartman:

Liamwitdre

2012-05-31 15:48:44

From: footballjds
could you post the entire script?
I'm 99% sure that we're helping this kid get around an anti-leach…

seriously, WriteIn(''); and a function with no var being returned…
looks like anti-leach to me, not a scripting error.


Easy mistakes when you've only been scripting for a matter of days. I used the basis of another script to help me get started hence the problems.

CephaXz

2012-05-31 17:26:38

Looks like a ring of duelling maker in our forum :cartman: