cradlefatal
2013-03-01 01:52:54
Okay I've decided to make my script one procedure at a time and then put it all together but I'm having a problem I've looked and looked but I cannot find the error I figured out how to get it to mapwalk and it gave me this ignore all the // it helps me remember what it is I'm doing in coding almost like a little mini tutorial on what codes do what :P I've looked everywhere for the error and I know its going to be something stupid
[Error] (104:144): Invalid number of parameters at line 103
Compiling failed.
program test; //name of my program
{$DEFINE SMART8}
{$I SRL\SRL.simba}
{$I SRL\SRL\misc\Debug.simba}
{$I Srl/Srl/Skill/Mining.Simba}
{$I Srl/Srl/Skill/Crafting.Simba}
{$I SRL\SRL\Misc\smartgraphics.simba}
{$I sps/sps.simba}
{$i ObjectDTM\ObjDTMInclude.simba} //These are all the includes that I'm using
Const //these are constants things that never change throughout the whole script
Version = 1.0;
Var LastPainted:Integer; StartTime: Integer; //These are global variables, variables that are used throughout the whole script
procedure DeclarePlayers; //this is a procedure, every procedure needs a name
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := ''; // Player username
Pass := ''; // Player password
Active := True;
end;
end; // this is login info needed for player to log in automatically
Procedure StatsGuise(wat:String); //when you use this program it writes the info into the little box at the bottom of the window
Begin
Status(wat);
Disguise(wat);
End;
Function CheckAndClick(UpText:String; X,Y:Integer; RClick:String):Boolean; //this is a function because it performs an action in this case, click on desired uptext
Begin
MMouse(x, y, 5, 5);
If WaitUptext(UpText, 150) Then
Begin
Result:=True;
GetMousePos(x, y);
Case RClick Of
'R':
Begin
Mouse(x, y, 0, 0, False);
WaitOption('Climb', 150);
//FFlag(3);
End;
'L':
Begin
Mouse(x, y, 0, 0,True);
//FFlag(3);
End;
End;
End;
End;
Procedure BasicSetup; // This is where you tell the computer what to do when logging in
Begin
StatsGuise(Players[CurrentPlayer].Nick + ' logging in');
LoginPlayer; if (SRL_Logs < 1) then SRL_Logs := 1;
Players[CurrentPlayer].Integers[82]:=0; //Temp Loads
Players[CurrentPlayer].Level[15]:= GetSkillLevel(Skill_Mining);
GameTab(Tab_Inv);
StatsGuise(Players[CurrentPlayer].Nick + ' Attack ' +IntToStr(Players[CurrentPlayer].Level[15]));
SetRun(True);
SetAngle(SRL_ANGLE_HIGH);
FindNormalRandoms;
End;
Procedure Bank_Walk; //this is how I walk
var
cx, cy: Integer;
Begin
If Not(LoggedIn) Then Exit;
// Bank_WalkDTM:=DTMFromString('90:79:5:0:7:142:47:0:7:88:31:1:7:120:29:3:7:106:96:3:7:102:121:6:81:46:110:48:112:75:72:154:53:68:66:48', '115:98:5:0:7:132:52:0:7:80:36:1:7:111:35:3:7:97:100:3:7:93:124:7:128:80:128:110:106:114:103:147:56:150:51:43:88:80', '138:102:4:0:7:96:36:1:7:75:20:3:7:61:84:3:7:57:108:5:146:67:144:107:119:138:63:71:158:68', '79:101:4:1:7:122:99:1:7:95:68:1:7:122:33:3:7:128:115:4:70:77:98:77:99:124:69:124');
//Climb-down Steps
Begin
If (ObjDTM_Find('104:116:5:1:7:96:27:2:7:22:124:5:7:78:89:10:7:132:86:10:7:92:128:3:80:83:87:149:130:113', cx, cy, True)) Then
Writeln('In Edgeville') Else
If (ObjDTM_Find('70:131:4:5:7:47:15:10:7:107:58:10:7:71:97:10:7:106:142:3:77:81:57:128:96:143', cx, cy, True)) Then
Writeln('Looking For Lodestone') Else
If (ObjDTM_Find('60:107:5:1:7:83:115:5:7:24:67:10:7:118:96:10:7:118:126:10:7:82:49:5:80:81:54:91:55:118:64:118:73:111', cx, cy, True)) Then
Writeln('Looking For Lodestone') Else
If (ObjDTM_Find('125:87:7:1:7:105:89:1:7:122:98:2:7:33:22:5:7:45:41:5:7:96:11:10:7:139:100:10:7:139:70:3:81:80:145:77:148:108', cx, cy, True)) Then
Writeln('Looking For Lodestone') Else
If (ObjDTM_Find('96:134:5:1:7:62:84:1:7:79:93:6:7:154:84:10:7:96:96:10:7:95:66:3:82:84:82:145:129:133', cx, cy, True)) Then
Writeln('Looking For Lodestone') Else
If (ObjDTM_Walk('62:119:5:1:7:63:40:2:7:91:138:2:7:75:142:6:7:135:30:10:7:74:31:5:80:80:50:95:46:111:58:118:73:112', 2, 100, 5, cx, cy, True)) Then
Writeln('Looking For Lodestone') Else
If (ObjDTM_Walk('61:87:5:1:7:48:33:2:7:91:136:10:7:78:44:10:7:86:25:10:7:67:44:5:80:81:50:95:50:110:64:113:76:99', 2, 100, 5, cx, cy True)) Then
Writeln('Looking For LodeStone') Else
If (ObjDTM_Walk('70:112:6:1:7:63:26:2:7:91:139:2:7:107:135:10:7:82:38:10:7:95:38:10:7:90:26:7:81:80:56:84:50:100:57:124:78:138:97:115:93:78', 2, 100, 5, True)) Then
Writeln('Looking For LodeStone') Else
If (ObjDTM_Walk('80:119:5:1:7:80:33:2:7:91:141:1:7:62:24:10:7:95:36:10:7:31:46:4:81:81:95:88:92:121:48:106', 2, 100, 5, True)) Then
Writeln('Made it to the Dragons');
end;
end;
begin // This is the actual program these are important steps
Smart_FixSpeed:=True;
SRL_SixHourFix:=True;
ClearDebug;
SetupSRL;
ObjDTM_Setup;
MarkTime(LastPainted);
MouseSpeed:=50;
DeclarePlayers;
StartTime:=GetSystemTime;
BasicSetup;
Bank_Walk; //this is what you actually do when you run the script
TerminateScript;
end.