Failed when compiling
Line 95: [Error] (16065:11): Invalid number of parameters in script
That's what i get. This is line 95:
Yes i have SRL included all that jazz.Code:NextPlayer;
Failed when compiling
Line 95: [Error] (16065:11): Invalid number of parameters in script
That's what i get. This is line 95:
Yes i have SRL included all that jazz.Code:NextPlayer;
show the whole procedure or whatever. i might be able to help
Code:procedure NoBan; begin AntiBan; BoredHuman; RandomMovement; FindMod; RotateEvery(10); FindNormalRandoms; if (not loggedin) then begin; NextPlayer; end;
{************************************************* ******************************
procedure NextPlayerOrder(Active : Boolean);
By: WT-Fakawi
Description: Logs in CurrentPlayer. If Player[CurrentPlayer].Active = False,
then next Player attempts to login.
************************************************** *****************************}
try putting this:
procedure NoBan;
begin
AntiBan;
BoredHuman;
RandomMovement;
FindMod;
RotateEvery(10);
FindNormalRandoms;
if (not (loggedin)) then begin;
NextPlayer(true);
end;
one difference...you didnt put (true) after nextplayer. see if that works.
Ok, thanks canadaman now i'm getting identifier expected :P never knew it was so hard to do multiplayers.
hmmmm....ill have to see the script.
PM-ed you it :P.
Replace
if (not (loggedin)) then begin;
NextPlayer(true);
with
if (not (loggedin)) then NextPlayer(true);
or
if (not (loggedin)) then
begin
NextPlayer(true);
end;
Yes, boreas i did that fixed that problem if you read above i'm now having problems with identifiers being expected. I'll post script to see if you can find whats wrong.
Code:program Hey321sNoobFighter; {.include SRL/SRL.scar} {.include SRL/SRL/Skill/Fighting.scar} {.include SRL/SRL/extended/xAntiRandoms.scar} var MColor1, MColor2, MColor3: Integer; var MonsterName:string; var MonstersFought: Integer; {Edit lines 17-19 with name/pass for login} Const Tolerance=5; fightmode=0; NumLoops=5; waittime=1000; procedure Colours; begin MonsterName:='Cow';//name of monster to fight. MColor1:=000000;//first colour on the monster. MColor2:=000000;//second colour. MColor3:=000000;//self explanotory. end; Procedure DeclarePlayers; begin HowManyPlayers:=4; NumberOfPlayers(HowManyPlayers); CurrentPlayer := 0; Players[0].Name :=''; Players[0].Pass :=''; Players[0].Nick :=''; Players[0].Active :=True; Players[1].Name :=''; Players[1].Pass :=''; Players[1].Nick :=''; Players[1].Active :=True; Players[2].Name :=''; Players[2].Pass :=''; Players[2].Nick :=''; Players[2].Active :=True; Players[3].Name :=''; Players[3].Pass :=''; Players[3].Nick :=''; Players[3].Active :=True; end; procedure Login; begin if(not loggedin)then loginplayer end; procedure NoBan; begin AntiBan; BoredHuman; RandomMovement; FindMod; RotateEvery(10); FindNormalRandoms; if (not (loggedin)) then begin NextPlayer(true); end; procedure Setup; begin SetupSRL; SetUpDemon; SetupSandWich; declareplayers; Login; SetFightMode(FightMode); end; procedure ProgressReport; begin Writeln('[]---////////////////////\\\\\\\\\\\\\\\---[]'); Writeln(' Thanks for using Hey321s'); Writeln(' Auto-Fighter '); Writeln(' Worked for:' +ScriptTime2(2)); Writeln(' Monsters Fought: '+IntToStr(MonstersFought)+''); Writeln('[]---////////////////////\\\\\\\\\\\\\\\---[]'); end; Procedure Fighting; begin if not InFight then begin FindMonster(MColor1, MColor2, MColor3,tolerance, MonsterName); KAttackMonster(MColor1,MColor2,MColor3,tolerance, MonsterName); end; while InFight do wait(waittime); end; begin Setup; Colours; repeat NoBan; Fighting; NoBan; ProgressReport; if (MonstersFought=NumLoops) then NextPlayer(true); end.
ok...
invalid number of parameters means you are putting the wrong number of arguments into a function or a procedure. i.e. "random(590,234,True,1.2)" becuase random only accepts ONE argument, that is an integer. different procedures/functions need different amounts of arguments.
identifyer expected means that there are too many "end"s or "begin"s. look through and keep track of how many begins are "open" (if you see a end, then that means one of the begins has been "closed") when you go through your script, there should be 0 open Begins at the end. this is because every begin needs one end.
And check out my pascal interpreter!
<R0b0t1> No, really, I went to a bar and picked up a transvestite.
Ok, wierd? I just counted them and i have 8 begin; 7 end; and 1 end. Is there something wrong with that? Either i did one or two things wrong or i suck at scripting :P.
you shouldn't have ; after begin
the main loop is
begin
end.
everything else is
begin
end;
Ex:
grr scar tags still screwedCode:if condtion then begin action1 action2 end; if condidtion then action1; case variable of outcome1: action1; outcome2: action2; end; case variable of outcome1: begin action1a; action1b; end; outcome2: begin action2a; action2b; end; end; procedure blah; var a :integer; begin writeln(inttostr(a)); end; function blah(a:integer):boolean; begin if a=1 then result:=true; end; //Main loop begin stuff; end.
:P Oops i forgot that haha i didnt put it in script accidently did here though :P.
i like your blah function. i think i might use it in my script!![]()
And check out my pascal interpreter!
<R0b0t1> No, really, I went to a bar and picked up a transvestite.
lol
There are currently 1 users browsing this thread. (0 members and 1 guests)