Results 1 to 4 of 4

Thread: small problem not sure how to fix it

  1. #1
    Join Date
    Dec 2007
    Posts
    24
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    small problem not sure how to fix it

    Hello ive been working on a woodcutting script ... it was working great till the end and now it gives me this error
    Line 1: [Error] (1:12): Unknown identifier '' in script (location of script)
    I know it feels like its a simple problem i didn't declare a variable or something but i checked and i think i declared everything properly well ... can someone help me finish plz thx

    [ NAME : Ultimate woodcutter
    [ WRITER : shaheerpak
    [ CATEGORY : woodcutter
    [ Description : A simple script that cuts wood ( color need to be picked)
    program New;
    {.include SRL/SRL.scar}

    const
    LoadsPerPlayer = 10; //Amounts of loads per player before switching.
    TreeColor = 0; //Fill in the treecolor here.
    WaitPerTree = 5000; //the time to wait while we are chopping the tree in Miliseconds.
    procedure DeclarePlayers;
    begin
    SetupPlayers;

    Players[0].Name := '';
    Players[0].Pass := '';
    Players[0].Nick := '';
    Players[0].Active := True;

    LoadPlayerArray;
    end;

    procedure ChopTree;
    var
    x, y, MyMark : integer;
    begin
    if not Loggedin then Exit;
    MarkTime(MyMark);
    repeat
    if FindObj(x, y, 'hop', TreeColor, 30) then
    begin
    Mouse(x, y, 0, 0, False);
    if ChooseOption('hop') then
    begin
    //increase 1 to the total tree chop - if we had one
    Wait(WaitPerTree);
    Exit; //We clicked chop, now we can exit this procedure.
    end;
    end;
    if TimeFromMark(MyMark) > (2 * 60 * 100) then
    begin
    Logout;
    Exit;
    end;
    until false
    end;

    begin
    SetupSRL;
    DeclarePlayers;
    if LoggedIn then Logout;
    LoginPlayer;
    repeat
    ChopTree;
    end;
    if not Loggedin then NextPlayer(False);
    until false
    end.

  2. #2
    Join Date
    Jul 2007
    Posts
    1,431
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    {[ NAME : Ultimate woodcutter
    [ WRITER : shaheerpak
    [ CATEGORY : woodcutter
    [ Description : A simple script that cuts wood ( color need to be picked) }

    program New;
    {.include SRL/SRL.scar}

    const
      LoadsPerPlayer = 10; //Amounts of loads per player before switching.
      TreeColor = 0; //Fill in the treecolor here.
      WaitPerTree = 5000; //the time to wait while we are chopping the tree in Miliseconds.


    procedure DeclarePlayers;
    begin
      CurrentPlayer  := 0;
      NumberOfPlayers(1);

      Players[0].Name := '';
      Players[0].Pass := '';
      Players[0].Nick := '';
      Players[0].Active := True;
    end;

    procedure ChopTree;
    var
    x, y, MyMark : integer;
    begin
      if not Loggedin then Exit;
      MarkTime(MyMark);
      repeat
        if FindObj(x, y, 'hop', TreeColor, 9) then
        begin
          Mouse(x, y, 0, 0, False);
          if ChooseOption('hop') then
          begin
            Wait(WaitPerTree);
            Exit;
          end;
        end;
        if TimeFromMark(MyMark) > (2 * 60 * 100) then
        begin
          Logout;
          Exit;
        end;
      until false
    end;

    begin
      SetupSRL;
      DeclarePlayers;
      if LoggedIn then Logout;
      LoginPlayer;
      repeat
        ChopTree;
        if not Loggedin then NextPlayer(False);
      until false
    end.
    [CENTER][SIZE="4"]Inactive[/SIZE]I forgot my password[/CENTER]

  3. #3
    Join Date
    Dec 2007
    Posts
    24
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thank you very much its working now -- not sure if ur gonna get this msg but if u do can u tell me wat did u change :$?
    thx

  4. #4
    Join Date
    Jul 2007
    Posts
    1,055
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    { } that is what he changed. basicly it makes w/e you type inside it doesn't affect the script. So typeing {writeLn('hi');} wont do anything in the script, but doing writeLn('hi); will type "hi" in the debug box. "//" does the same thing except // only works for one line; so
    // hello

    {hello
    world}

    Both will be invisble to the actual script.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Small Problem
    By lilpaintballer in forum OSR Help
    Replies: 9
    Last Post: 09-27-2008, 10:04 PM
  2. small problem. Need help.
    By One Leeter in forum OSR Help
    Replies: 8
    Last Post: 06-15-2007, 09:03 PM

Posting Permissions

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