SRL Archive - OSR Help

Can someone please help me out on my first script?


dayto123

2013-03-05 23:29:55

I watched a tutorial video and decided to give it a try and i keep running into 2 errors.
[CODE][/CODE]Procedure P07_Deposit(1, 28: Integer; DepositAll: Boolean);
If P07_BankScreen Then P07_Deposit(1, 28, False);
If P07_BankScreen And P07_InvFull Then P07_Deposit(1, 28, True);

End;
It tells me Duplicate identifier 'P07_DEPOSIT' at line 87
Compiling failed.

Then i also get an error here:
begin
ClearDebug;
SetupSRL;
SetupP07Include;
DeclarePlayers; // Calls the procedure, you can't forget this!
LoginPlayer; // You want your player to login, right?
repeat;
Fishing;
antiBan;
[B]WalkToBank;[/B]
BankEdgeville;
DepositAll;
end.

It says Invalid number of Parameters set and i'am unsure of how to fix.
It may be something completely stupid and easy but i'am a noob and cant figure it out sorry :(

procedure WalkToBank(RadialWalkin: Integer);
begin
case RadialWalkin of
1: RadialWalk(1003042, 0, 90, 15, 5, 5); //the 15855597 would be where your color would go. to pick a color, go to SCAR, and press Ctrl + Alt + P and click on the spot that your color is. It will wright the color in the debug box.
2: RadialWalk(941920, 0, 90, 50, 5, 5); //0, 90 is the section on the mini map it searches for, in this case, the whole north/west corner
3: RadialWalk(1137259, 0, 180, 60, 5, 5); //60 means it will search all the way out to the edge of the mini map from the center
4: RadialWalk(1191752, 0, 90, 60, 5, 5); //the 5, 5, means that if the flag doesn't appear, it will search 5 pixels away from that area
5: RadialWalk(5526878, 0, 90, 15, 5, 5); //the 5, 5, means that if the flag doesn't appear, it will search 5 pixels away from that area
end;
end;
Code added

mmmvvvbbb

2013-03-06 01:59:23

It would be better if you posted your entire code, but I know the first error has to do with your syntax.

Procedure [S]P07_Deposit(1, 28: Integer; DepositAll: Boolean);[/S] This needs to be the "name" of the procedure.
If P07_BankScreen Then
P07_Deposit(1, 28, False);
If P07_BankScreen And P07_InvFull Then
P07_Deposit(1, 28, True);

End;
Duplicate Identifier means that the "name" has already been used. In this case by the P07 include.
This is how I would do it.

Procedure Deposit;
If P07_BankScreen Then
P07_Deposit(1, 28, False);
If P07_BankScreen And P07_InvFull Then
P07_Deposit(1, 28, True);
End;

I can't help with the second error unless you at least post your WalkToBank Procedure. Keep working at it, I know ohh to well it can be frustrating.

dayto123

2013-03-06 08:49:47

Updated code and thanks for the help so far.