Results 1 to 3 of 3

Thread: Map Walking HELP

  1. #1
    Join Date
    Mar 2007
    Posts
    1,223
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default Map Walking HELP

    hello everyone! im working on my map walking! please help me and fix this error! THANKS !!!!!

    This is the error: Failed when compiling
    Line 55: [Error] (12719:10): Duplicate identifier 'RADIALROADWALK' in script C:\Documents and Settings\Owner\My Documents\Grade 7\SCAR 3.15\Scripts\walktobank.scar

    and if anyone finds the error's solution can you also tel me how to use this in my script and if i used it properly in the script?
    THANKS TO EVERYONE!

    SCAR Code:
    program Walktobank;
    {.include SRL/SRL/misc/SMART.scar}
    {.include SRL/SRL.scar}

    const
      SmartWorld      = 14;   //  what world smart uses
      Signed          = True;

    procedure DeclarePlayers;
    begin
      HowManyPlayers :=1;  // how many players do you want
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer:=0
      Players[0].Name   := 'Username'; //Character Name
      Players[0].Pass   := 'dontpass'; //Character Pass
      Players[0].Nick   := 'oney'; //Nickname 3 - 4 Letter's of char name
      Players[0].Active := True; //true if you want this player to be ran in the script false if you dont want it to run
    end;

    procedure Signature;
    begin
     ClearDebug;
     writeln(' BOH presents mine picker:');
     wait(250);
     writeln(' __________   _________    ___     ___ ');
     wait(250);
     writeln('|   ____   | |         |  |   |   |   |');
     wait(250);
     writeln('|  |    |  | |  _____  |  |   |   |   |');
     wait(250);
     writeln('|  |____|  | | |     | |  |   |___|   |');
     wait(250);
     writeln('|   _______| | |     | |  |    ___    |');
     wait(250);
     writeln('|   ____   | | |_____| |  |   |   |   |');
     wait(250);
     writeln('|  |    |  | |         |  |   |   |   |');
     wait(250);
     writeln('|  |____|  | |_________|  |___|   |___|');
     wait(250);
     writeln('|__________| Made To Succeed!          ');
     wait(3000 + random(750));
    end;

    procedure SetupSmart;
    begin
      SmartSetupEx(SmartWorld, false, Signed);
      ClearDebug;
      WriteLn('Setting up Smart... Please Hold...');
      Wait(10000 + random(5000));
      SetTargetDC(SmartGetDC);
      While not(SmartReady) do Wait(100);
    end;

    function RadialRoadWalk(FindRoadColor,0,90,72,-2,0);



    begin
    SetupSmart;
    SetupSrl;
    DeclarePlayers;
    RadialRoadWalk
    end.

  2. #2
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    By going:
    SCAR Code:
    function RadialRoadWalk(FindRoadColor,0,90,72,-2,0);

    you are declaring a new function called RadialRoadWalk. Since this function is already in SRL it gives you a duplicate identifier error which basically means theres to identifiers (vars, functions, procedures, contants) with the same name..

    What I think you want to do is call the function (make SCAR run the function and do the stuff coded inside). To do this you don't need to have the word 'function' in front. You also need to call it in another procedure or in the mainloop:

    SCAR Code:
    program Walktobank;
    {.include SRL/SRL/misc/SMART.scar}
    {.include SRL/SRL.scar}
     
    const
      SmartWorld      = 14;   //  what world smart uses
      Signed          = True;
     
    procedure DeclarePlayers;
    begin
      HowManyPlayers :=1;  // how many players do you want
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer:=0
      Players[0].Name   := 'Username'; //Character Name
      Players[0].Pass   := 'dontpass'; //Character Pass
      Players[0].Nick   := 'oney'; //Nickname 3 - 4 Letter's of char name
      Players[0].Active := True; //true if you want this player to be ran in the script false if you dont want it to run
    end;
     
    procedure Signature;
    begin
     ClearDebug;
     writeln(' BOH presents mine picker:');
     wait(250);
     writeln(' __________   _________    ___     ___ ');
     wait(250);
     writeln('|   ____   | |         |  |   |   |   |');
     wait(250);
     writeln('|  |    |  | |  _____  |  |   |   |   |');
     wait(250);
     writeln('|  |____|  | | |     | |  |   |___|   |');
     wait(250);
     writeln('|   _______| | |     | |  |    ___    |');
     wait(250);
     writeln('|   ____   | | |_____| |  |   |   |   |');
     wait(250);
     writeln('|  |    |  | |         |  |   |   |   |');
     wait(250);
     writeln('|  |____|  | |_________|  |___|   |___|');
     wait(250);
     writeln('|__________| Made To Succeed!          ');
     wait(3000 + random(750));
    end;
     
    procedure SetupSmart;
    begin
      SmartSetupEx(SmartWorld, false, Signed);
      ClearDebug;
      WriteLn('Setting up Smart... Please Hold...');
      Wait(10000 + random(5000));
      SetTargetDC(SmartGetDC);
      While not(SmartReady) do Wait(100);
    end;
     
    begin
    SetupSmart;
    SetupSrl;
    DeclarePlayers;
    RadialRoadWalk(FindRoadColor,0,90,72,-2,0);
    end.

  3. #3
    Join Date
    Mar 2007
    Posts
    1,223
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by ZephyrsFury View Post
    By going:
    SCAR Code:
    function RadialRoadWalk(FindRoadColor,0,90,72,-2,0);

    you are declaring a new function called RadialRoadWalk. Since this function is already in SRL it gives you a duplicate identifier error which basically means theres to identifiers (vars, functions, procedures, contants) with the same name..

    What I think you want to do is call the function (make SCAR run the function and do the stuff coded inside). To do this you don't need to have the word 'function' in front. You also need to call it in another procedure or in the mainloop:

    SCAR Code:
    program Walktobank;
    {.include SRL/SRL/misc/SMART.scar}
    {.include SRL/SRL.scar}
     
    const
      SmartWorld      = 14;   //  what world smart uses
      Signed          = True;
     
    procedure DeclarePlayers;
    begin
      HowManyPlayers :=1;  // how many players do you want
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer:=0
      Players[0].Name   := 'Username'; //Character Name
      Players[0].Pass   := 'dontpass'; //Character Pass
      Players[0].Nick   := 'oney'; //Nickname 3 - 4 Letter's of char name
      Players[0].Active := True; //true if you want this player to be ran in the script false if you dont want it to run
    end;
     
    procedure Signature;
    begin
     ClearDebug;
     writeln(' BOH presents mine picker:');
     wait(250);
     writeln(' __________   _________    ___     ___ ');
     wait(250);
     writeln('|   ____   | |         |  |   |   |   |');
     wait(250);
     writeln('|  |    |  | |  _____  |  |   |   |   |');
     wait(250);
     writeln('|  |____|  | | |     | |  |   |___|   |');
     wait(250);
     writeln('|   _______| | |     | |  |    ___    |');
     wait(250);
     writeln('|   ____   | | |_____| |  |   |   |   |');
     wait(250);
     writeln('|  |    |  | |         |  |   |   |   |');
     wait(250);
     writeln('|  |____|  | |_________|  |___|   |___|');
     wait(250);
     writeln('|__________| Made To Succeed!          ');
     wait(3000 + random(750));
    end;
     
    procedure SetupSmart;
    begin
      SmartSetupEx(SmartWorld, false, Signed);
      ClearDebug;
      WriteLn('Setting up Smart... Please Hold...');
      Wait(10000 + random(5000));
      SetTargetDC(SmartGetDC);
      While not(SmartReady) do Wait(100);
    end;
     
    begin
    SetupSmart;
    SetupSrl;
    DeclarePlayers;
    RadialRoadWalk(FindRoadColor,0,90,72,-2,0);
    end.

    ooo thx a bunch! but so i do have to change "RadialRoadWalk" to watever i want? and if i do, do i have to declare it? and whr?

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. walking help?
    By Rubix in forum OSR Help
    Replies: 0
    Last Post: 07-15-2008, 02:35 AM
  2. Walking
    By imskate182 in forum OSR Help
    Replies: 4
    Last Post: 12-20-2007, 05:18 AM
  3. Map walking
    By boberman in forum OSR Help
    Replies: 1
    Last Post: 12-06-2007, 12:48 AM
  4. help with walking
    By Jake_453 in forum OSR Help
    Replies: 7
    Last Post: 05-15-2007, 12:49 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
  •