Results 1 to 7 of 7

Thread: Identifier Expected.

  1. #1
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default Identifier Expected.

    Wow such a nooby error; here are the two procedures that may be involved:

    SCAR Code:
    function FindAnvil(var x, y: integer): boolean;
    var Anvil: TPointArray;
        Anvil2: T2DPointArray;
        H, i, TCTS: integer;
    begin
      if FailSafes then exit;
      TCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      result := false;
      FindColorsSpiralTolerance(x, y, Anvil, AnvilColor, MSX1 + 100, MSY1 + 100, MSX2 - 100, MSY2 - 100, 2);
      Anvil2 := TPAtoATPAEx(Anvil, 20, 20);
      H := High(Anvil2);
      for i:= 0 to H do
      begin
        MiddleTPAEx(Anvil2[i], x, y);
        MMouse(x, y, 2, 2);
        if IsUpText('nvil') then
        begin
          result := true;
          break;
        end;
      end;
      GetMousePos(x, y);
      ColorToleranceSpeed(TCTS);
    end;

    function Smith: boolean;
    var Retry: label; //Apparent error... :(
    begin
      result := false;
      if Failsafes then exit;
      if AnvilColor = 0 then
        AnvilColor := FindAnvilColorMS;
      if FindDTM(BarDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
      begin
        MMouse(x, y, 4, 4);
        Wait(100+random(50));
        NMouse(x, y, 1, 1, 'se');
        if FindAnvil then
          NMouse(x, y, 0, 0, 'nvil')
        else
        if WeLost('Smithing') then
          exit;
        if not SmithScreen then
          exit;
        FixSmithScreen(Hi);
        MouseBox(x1, y1, x2, y2, 2);
        Wait(100+random(50));
        if IsUpText(IText) then
        begin
          GetMousePos(x, y);
          Retry;
          Mouse(x, y, 0, 0, false);
          Wait(100+random(50));
          case random(10) of
            0..8: ChooseOption('ll');
            9: begin
                 ChooseOption('10');
                 Wait(7000+random(4000));
                 GoTo Retry;
               end;
            end;
          result := true;
        end;
      end else;
      begin
        Writeln('Could not find any bars in your inventory; banking to get more.');
        PLoc('Banking to get more bars.', false);
        exit;
      end;
    end;

    The error line reads:
    Code:
    Line 1170: [Error] (13824:12): Identifier expected in script C:\Documents and Settings
    Thanks for reading

    Nava2
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  2. #2
    Join Date
    Feb 2008
    Location
    In the woods of Finland
    Posts
    45
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    function Smith: boolean;
    Label
      Retry;
    begin
    ...
    Label is not a variable
    Cut & Drop or Stock Powerchonker


    Teh 3vil Oar H1t5 Chuck Norris Stone c0ld

  3. #3
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    *reminds himself to tell bullzeye95 he was wrong.*

    Thanks troll.

    Edit: omg you posted.

    Nava2
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  4. #4
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    New error, how do you call a GoTo label? It says I need a ':'...

    Nava2
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  5. #5
    Join Date
    Jun 2006
    Posts
    3,861
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Just to sustain some credibility here, I wasn't wrong
    I just gave him a bad example and threw him off.

  6. #6
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    10,812
    Mentioned
    3 Post(s)
    Quoted
    16 Post(s)

    Default

    Goto BlahLabel: begin Stuff; end;

    is how you call a label.


    Send SMS messages using Simba
    Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!

  7. #7
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by Hy71194 View Post
    Goto BlahLabel: begin Stuff; end;

    is how you call a label.
    Nope

    You call it like:

    Label:

    then

    Goto Label;

    Bullzeye told me how h):

    Nava2
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Identifier Expected
    By Torrent of Flame in forum OSR Help
    Replies: 9
    Last Post: 02-23-2008, 01:21 PM
  2. Identifier expected
    By badandymitch in forum OSR Help
    Replies: 4
    Last Post: 05-31-2007, 11:57 PM
  3. Identifier Expected
    By PwNZoRNooB in forum OSR Help
    Replies: 5
    Last Post: 05-03-2007, 07:05 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
  •