Results 1 to 7 of 7

Thread: Invalid Number of Parameters

  1. #1
    Join Date
    Jun 2007
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Invalid Number of Parameters

    i got this error in a script i was using today

    here is the line the error pointed me to


    if(FishMode=2)or(FishMode=3)then

  2. #2
    Join Date
    Sep 2006
    Location
    New Jersey, USA
    Posts
    5,347
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    What's the line before that?

    What script was it?
    Interested in C# and Electrical Engineering? This might interest you.

  3. #3
    Join Date
    Jan 2007
    Location
    Kansas
    Posts
    3,760
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    put another if right after the or


  4. #4
    Join Date
    Jun 2007
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ty i got that line finished then i got the same error on this

    Trys:=Trys+1;

  5. #5
    Join Date
    Jun 2007
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    here is the whole script

    ////////////////////////////////////
    // Catherby Fisher //
    // v1.5 //
    // By Taminoo //
    // With some Help of Portal(god) //
    // AND MUTANT CAUSE..hes the shiz//
    ////////////////////////////////////////////////////
    // Start in Catherby bank for lobby for swordfish,//
    // Most Western booth. //
    // Have Cage, Harpoon, Or Net in first invin slot //
    // MUST have atleast 1 extra cage/harpoon in 1st //
    // bank slot!! //
    ////////////////////////////////////////////////////
    // v1.0-Inital Testing //
    // v1.1-Shark Fishing Added //
    // v1.5-ALOT of updates //
    ////////////////////////////////////////////////////
    program fisher;
    {.include library2.txt}
    {.include MRI.txt}
    {.include boxbreaker2.txt}
    var fishs,trips,trys:integer;

    procedure banks;forward;
    procedure catchfish;forward;
    procedure tobank;forward;
    procedure script;forward;

    const
    /////SET THESE///////////////////////////////////////
    LampSkill = 'fishing'; //
    Us = 1;//Set the username and password number //
    Look = 5;//Number of times to look for lost item //
    FishMode = 1;// 1 for Catherby Lobby //
    // 2 for Catherby Swordfish/Tuna //
    // 3 for Catherby Shark //
    /////DONT TOUCH//////////////////////////////////////
    road = 5592411; //
    tree = 15891; //
    bubbles = 15249544; //
    bank = 3060683; //
    /////////////////////////////////////////////////////

    procedure report;
    var RHours,Minutes,Seconds,RMinutes,RSeconds,avtime:Lo ngInt; Time:String;
    begin
    begin
    Seconds:=(GetSystemTime-ST) div 1000;
    Minutes:=Seconds div 60; RHours:=Minutes
    div 60; Time:=inttostr(Seconds)+' Seconds';
    avtime:=Seconds/trips;
    if Minutes<>0 then
    begin
    RSeconds:=Seconds Mod (Minutes*60);
    Time:=inttostr(Minutes)+' Minutes and '+inttostr(RSeconds)+' Seconds';
    end;
    if RHours<>0 then
    begin
    RMinutes:=Minutes Mod (RHours*60);
    RSeconds:=Seconds Mod (Minutes*60);
    Time:=inttostr(RHours)+' Hours, '+inttostr(RMinutes)+' Minutes and '
    +inttostr(RSeconds)+' Seconds';
    end;
    clearreport;
    addtoreport('SS Ulti Fisher v1.0');
    addtoreport(' By Taminoo');
    addtoreport('-------------------');
    addtoreport('Worked for '+ Time);
    addtoreport('Ran ' + inttostr(trips) + ' times');
    if(FishMode=1)then
    addtoreport('Fished & Banked ' + inttostr(fishs) + ' Lobbies');
    if(FishMode=2)then
    addtoreport('Fished & Banked ' + inttostr(fishs) + ' Swordfish or Tuna');
    if(FishMode=3)then
    addtoreport('Fished & Banked ' + inttostr(fishs) + ' Sharks');
    end;
    end;

    procedure runaway;
    begin
    mouse(701,84,0,0,true)
    wait(5000)
    mouse(610,78,0,0,true)
    catchfish;
    end;

    Procedure StandStill;
    begin
    Mouse(647,82,2,2,true);
    wait(3000);
    end;

    procedure Randoms;
    begin
    if(FishEquip)then
    begin
    repeat
    if(FishMode=1)then
    PickUpObject('Take Lob','Lobster Pot',607847)
    if (fishmode=2) or (fishmode=3) then
    PickUpObject('Take Harpoon',942722)
    Trys:=Trys+1;
    until(Look=Trys)
    if(Look=Trys)then
    ToBank;
    end;
    FindMiscRandoms;
    if(FindText)then
    begin
    Talk;
    end
    FindStrangeBox;
    login(Us);
    if(Fight)then
    begin
    ToBank;
    Banks;
    Script;
    end;
    if(Dead)then
    begin
    Logout;
    end;
    UseLamp(LampSkill);
    end;
    procedure tofish;
    begin
    if(FishMode=1)or(FishMode=2)or(FishMode=3)then
    begin
    randoms;
    if(findcolor(x,y,road,677,95,695,102))then
    Mouse(x,y,0,0,true)
    Flag;
    repeat
    randoms;
    if(findcolor(x,y,road,667,85,690,90))then
    Mouse(x,y,0,0,true)
    Flag;
    until(findcolor(x,y,tree,666,80,700,105))
    randoms;
    Mouse(680,108,0,0,true)
    Flag;
    end;
    end;

    procedure tobank;
    begin
    run(true)
    Mouse(647,184,0,0,true)
    if(FishMode=1)or(FishMode=2)or(FishMode=3)then
    begin
    randoms;
    if(findcolor(x,y,road,580,40,650,75))then
    Mouse(x,y,0,0,true)
    Flag;
    repeat
    randoms;
    if(findcolor(x,y,road,610,80,640,95))then
    Mouse(x,y,0,0,true)
    Flag;
    until(findcolor(x,y,bank,624,54,638,73))
    randoms;
    Mouse(630,73,0,0,true)
    Flag;
    end;
    end;

    procedure CatchFish;
    begin
    repeat
    Randoms;
    if(FishMode=1)then
    begin
    Randoms;
    repeat
    if(FindObj('Ca',bubbles,10))then
    Mouse(x,y,0,0,false)
    until(SearchForText(3,3,515,336,'Cage',2))
    If(SearchForText(3,3,515,336,'Cage',2))then
    ClickText(3,3,515,336,'Cage',2);
    Randoms;
    end;
    if(FishMode=3)then
    begin
    Randoms;
    repeat
    if(FindObj('Net',bubbles,10))then
    Mouse(x,y,0,0,false)
    until(SearchForText(3,3,515,336,'Harpoon',2))
    If(SearchForText(3,3,515,336,'Harpoon',2))then
    ClickText(3,3,515,336,'Harpoon',2);
    Randoms;
    end;
    if(FishMode=2)then
    begin
    Randoms;
    repeat
    if(FindObj('Cage',bubbles,10))then
    Mouse(x,y,0,0,false)
    until(SearchForText(3,3,515,336,'Harpoon',2))
    If(SearchForText(3,3,515,336,'Harpoon',2))then
    ClickText(3,3,515,336,'Harpoon',2);
    Randoms;
    end;
    wait(5000)
    if(InventoryCount=28)then
    begin
    ToBank;
    Banks;
    Script;
    end;
    Randoms;
    wait(5000)
    if(InventoryCount=28)then
    begin
    ToBank;
    Banks;
    Script;
    end;
    Randoms;
    wait(5000)
    if(InventoryCount=28)then
    begin
    ToBank;
    Banks;
    Script;
    end;
    Randoms;
    wait(5000)
    if(InventoryCount=28)then
    begin
    ToBank;
    Banks;
    Script;
    end;
    Randoms;
    wait(5000)
    if(InventoryCount=28)then
    begin
    ToBank;
    Banks;
    Script;
    end;
    Randoms;
    StandStill;
    until(InventoryCount=28)
    end;

    procedure banks;
    begin
    repeat
    randoms;
    openbank;
    until(bankscreen)
    depositall;
    Mouse(93,77,0,0,true)
    Mouse(459,44,0,0,true)
    randoms;
    fishs:=fishs+27;
    end;

    Procedure Thingy;
    begin
    If(FishMode=1)Then
    begin
    GetFishEquipColor('Pot')
    end;
    If(FishMode=2)or(FishMode=2)Then
    begin
    GetFishEquipColor('Harpoon')
    end;
    end;

    Procedure CheckLib;
    begin
    If(Not(LibVersion='3.3'))Then
    begin
    WriteLn('Please Visit http://www.runesc.net')
    WriteLn('To Get Updated Library2.txt Version 3.1')
    repeat wait(100) until(false)
    end;
    end;

    procedure script;
    begin
    tofish;
    CatchFish;
    tobank;
    banks;
    Trips:=trips+1;
    report;
    end;

    begin
    ST:=GetSystemTime;
    loadlibrary('Internet Explorer');
    BoxOpenerSetup;
    LoadMRI;
    CheckLib;
    SetBrightness('V-Bright')
    Thingy;
    setchat('Off')
    repeat
    script;
    until(false)
    end.program New;
    begin
    end.

  6. #6
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    SCAR Code:
    ////////////////////////////////////
    // Catherby Fisher //
    // v1.5 //
    // By Taminoo //
    // With some Help of Portal(god) //
    // AND MUTANT CAUSE..hes the shiz//
    ////////////////////////////////////////////////////
    // Start in Catherby bank for lobby for swordfish,//
    // Most Western booth. //
    // Have Cage, Harpoon, Or Net in first invin slot //
    // MUST have atleast 1 extra cage/harpoon in 1st //
    // bank slot!! //
    ////////////////////////////////////////////////////
    // v1.0-Inital Testing //
    // v1.1-Shark Fishing Added //
    // v1.5-ALOT of updates //
    ////////////////////////////////////////////////////
    program fisher;
    {.include library2.txt}
    {.include MRI.txt}
    {.include boxbreaker2.txt}
    var fishs,trips,trys:integer;

    procedure banks;forward;
    procedure catchfish;forward;
    procedure tobank;forward;
    procedure script;forward;

    const
    /////SET THESE///////////////////////////////////////
    LampSkill = 'fishing'; //
    Us = 1;//Set the username and password number //
    Look = 5;//Number of times to look for lost item //
    FishMode = 1;// 1 for Catherby Lobby //
    // 2 for Catherby Swordfish/Tuna //
    // 3 for Catherby Shark //
    /////DONT TOUCH//////////////////////////////////////
    road = 5592411; //
    tree = 15891; //
    bubbles = 15249544; //
    bank = 3060683; //
    /////////////////////////////////////////////////////

    procedure report;
    var RHours,Minutes,Seconds,RMinutes,RSeconds,avtime:Lo ngInt; Time:String;
    begin
    begin
    Seconds:=(GetSystemTime-ST) div 1000;
    Minutes:=Seconds div 60; RHours:=Minutes
    div 60; Time:=inttostr(Seconds)+' Seconds';
    avtime:=Seconds/trips;
    if Minutes<>0 then
    begin
    RSeconds:=Seconds Mod (Minutes*60);
    Time:=inttostr(Minutes)+' Minutes and '+inttostr(RSeconds)+' Seconds';
    end;
    if RHours<>0 then
    begin
    RMinutes:=Minutes Mod (RHours*60);
    RSeconds:=Seconds Mod (Minutes*60);
    Time:=inttostr(RHours)+' Hours, '+inttostr(RMinutes)+' Minutes and '
    +inttostr(RSeconds)+' Seconds';
    end;
    clearreport;
    addtoreport('SS Ulti Fisher v1.0');
    addtoreport(' By Taminoo');
    addtoreport('-------------------');
    addtoreport('Worked for '+ Time);
    addtoreport('Ran ' + inttostr(trips) + ' times');
    if(FishMode=1)then
    addtoreport('Fished & Banked ' + inttostr(fishs) + ' Lobbies');
    if(FishMode=2)then
    addtoreport('Fished & Banked ' + inttostr(fishs) + ' Swordfish or Tuna');
    if(FishMode=3)then
    addtoreport('Fished & Banked ' + inttostr(fishs) + ' Sharks');
    end;
    end;

    procedure runaway;
    begin
    mouse(701,84,0,0,true)
    wait(5000)
    mouse(610,78,0,0,true)
    catchfish;
    end;

    Procedure StandStill;
    begin
    Mouse(647,82,2,2,true);
    wait(3000);
    end;

    procedure Randoms;
    begin
    if(FishEquip)then
    begin
    repeat
    if(FishMode=1)then
    PickUpObject('Take Lob','Lobster Pot',607847)
    if (fishmode=2) or (fishmode=3) then
    PickUpObject('Take Harpoon',942722)
    Trys:=Trys+1;
    until(Look=Trys)
    if(Look=Trys)then
    ToBank;
    end;
    FindMiscRandoms;
    if(FindText)then
    begin
    Talk;
    end
    FindStrangeBox;
    login(Us);
    if(Fight)then
    begin
    ToBank;
    Banks;
    Script;
    end;
    if(Dead)then
    begin
    Logout;
    end;
    UseLamp(LampSkill);
    end;
    procedure tofish;
    begin
    if(FishMode=1)or(FishMode=2)or(FishMode=3)then
    begin
    randoms;
    if(findcolor(x,y,road,677,95,695,102))then
    Mouse(x,y,0,0,true)
    Flag;
    repeat
    randoms;
    if(findcolor(x,y,road,667,85,690,90))then
    Mouse(x,y,0,0,true)
    Flag;
    until(findcolor(x,y,tree,666,80,700,105))
    randoms;
    Mouse(680,108,0,0,true)
    Flag;
    end;
    end;

    procedure tobank;
    begin
    run(true)
    Mouse(647,184,0,0,true)
    if(FishMode=1)or(FishMode=2)or(FishMode=3)then
    begin
    randoms;
    if(findcolor(x,y,road,580,40,650,75))then
    Mouse(x,y,0,0,true)
    Flag;
    repeat
    randoms;
    if(findcolor(x,y,road,610,80,640,95))then
    Mouse(x,y,0,0,true)
    Flag;
    until(findcolor(x,y,bank,624,54,638,73))
    randoms;
    Mouse(630,73,0,0,true)
    Flag;
    end;
    end;

    procedure CatchFish;
    begin
    repeat
    Randoms;
    if(FishMode=1)then
    begin
    Randoms;
    repeat
    if(FindObj('Ca',bubbles,10))then
    Mouse(x,y,0,0,false)
    until(SearchForText(3,3,515,336,'Cage',2))
    If(SearchForText(3,3,515,336,'Cage',2))then
    ClickText(3,3,515,336,'Cage',2);
    Randoms;
    end;
    if(FishMode=3)then
    begin
    Randoms;
    repeat
    if(FindObj('Net',bubbles,10))then
    Mouse(x,y,0,0,false)
    until(SearchForText(3,3,515,336,'Harpoon',2))
    If(SearchForText(3,3,515,336,'Harpoon',2))then
    ClickText(3,3,515,336,'Harpoon',2);
    Randoms;
    end;
    if(FishMode=2)then
    begin
    Randoms;
    repeat
    if(FindObj('Cage',bubbles,10))then
    Mouse(x,y,0,0,false)
    until(SearchForText(3,3,515,336,'Harpoon',2))
    If(SearchForText(3,3,515,336,'Harpoon',2))then
    ClickText(3,3,515,336,'Harpoon',2);
    Randoms;
    end;
    wait(5000)
    if(InventoryCount=28)then
    begin
    ToBank;
    Banks;
    Script;
    end;
    Randoms;
    wait(5000)
    if(InventoryCount=28)then
    begin
    ToBank;
    Banks;
    Script;
    end;
    Randoms;
    wait(5000)
    if(InventoryCount=28)then
    begin
    ToBank;
    Banks;
    Script;
    end;
    Randoms;
    wait(5000)
    if(InventoryCount=28)then
    begin
    ToBank;
    Banks;
    Script;
    end;
    Randoms;
    wait(5000)
    if(InventoryCount=28)then
    begin
    ToBank;
    Banks;
    Script;
    end;
    Randoms;
    StandStill;
    until(InventoryCount=28)
    end;

    procedure banks;
    begin
    repeat
    randoms;
    openbank;
    until(bankscreen)
    depositall;
    Mouse(93,77,0,0,true)
    Mouse(459,44,0,0,true)
    randoms;
    fishs:=fishs+27;
    end;

    Procedure Thingy;
    begin
    If(FishMode=1)Then
    begin
    GetFishEquipColor('Pot')
    end;
    If(FishMode=2)or(FishMode=2)Then
    begin
    GetFishEquipColor('Harpoon')
    end;
    end;

    Procedure CheckLib;
    begin
    If(Not(LibVersion='3.3'))Then
    begin
    WriteLn('Please Visit http://www.runesc.net')
    WriteLn('To Get Updated Library2.txt Version 3.1')
    repeat wait(100) until(false)
    end;
    end;

    procedure script;
    begin
    tofish;
    CatchFish;
    tobank;
    banks;
    Trips:=trips+1;
    report;
    end;

    begin
    ST:=GetSystemTime;
    loadlibrary('Internet Explorer');
    BoxOpenerSetup;
    LoadMRI;
    CheckLib;
    SetBrightness('V-Bright')
    Thingy;
    setchat('Off')
    repeat
    script;
    until(false)
    end.program New;
    begin
    end.
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  7. #7
    Join Date
    May 2006
    Posts
    1,230
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    invalid parameters means u didn't fill out the params correctely.

    so in

    PickUpObject('Take Harpoon',942722)

    your missing a parameter, looked at the previous one u did

    PickUpObject('Take Lob','Lobster Pot',607847)

    see the difference?(look at commas)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. invalid number of parameters
    By Griff in forum OSR Help
    Replies: 4
    Last Post: 09-27-2008, 04:16 AM
  2. Invalid Number Of Parameters
    By decide in forum OSR Help
    Replies: 3
    Last Post: 07-28-2008, 06:11 AM
  3. Invalid number of parameters
    By kristahlyn in forum OSR Help
    Replies: 2
    Last Post: 06-16-2007, 02:39 PM
  4. invalid number of parameters
    By stuckman in forum OSR Help
    Replies: 4
    Last Post: 05-27-2007, 01:32 PM
  5. Invalid Number Of Parameters
    By Any-key in forum OSR Help
    Replies: 12
    Last Post: 04-21-2007, 12:11 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •