Results 1 to 4 of 4

Thread: Duplicate identifier '' Error

  1. #1
    Join Date
    Jun 2012
    Posts
    4,867
    Mentioned
    74 Post(s)
    Quoted
    1663 Post(s)

    Default Duplicate identifier '' Error

    Hey guys i'm working on my first script and using Yohojo's video tutorials. I got this error and searched around but all the solutions say that it is already included in SRL but I don't think this is the problem here. Anyway here's the Error:

    Code:
    [Error] C:\Simba\Scripts\Chicken Cooker.simba(27:8): Duplicate identifier '' at line 26
    Compiling failed.
    And here's the rest of the script

    Simba Code:
    program ChickenCooker;

    {$Define smart}
    {$i srl/srl.simba}


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

      with Players[0] do
      begin
        Name       := ''; // Player username
        Pass       := ''; // Player password
        BoxRewards := ['XP', 'ostume', 'mote', 'oins', 'une', 'ssence'];
        LampSkill  := Skill_Cooking;
        Active     := True;
      end;
    end;


    Function GetTheChicken:Boolean;
    Var
      x, y,: Integer; // This line has the error highlights
    begin
    //FindObjCustom(x, y, ['att', 'ack'], [123456, 345678], 5);
      If FindObjCustom(x, y, ['take', 'Raw', 'Chicken'], [9673643, 9343908, 9212579, 8160399], 10) Then
      WriteLn('Chicken Located')
    End;





    begin
      SetupSRL;
      DeclarePlayers;
      Repeat
        GetChicken
      Until(false);
    end.

    Any help is appreciated, Thanks

  2. #2
    Join Date
    Mar 2012
    Location
    127.0.0.1
    Posts
    3,383
    Mentioned
    95 Post(s)
    Quoted
    717 Post(s)

    Default

    Take the comma out after the y

  3. #3
    Join Date
    Dec 2011
    Location
    New York, USA
    Posts
    1,242
    Mentioned
    12 Post(s)
    Quoted
    193 Post(s)

    Default

    get rid of the comma before the semicolon

  4. #4
    Join Date
    Jun 2012
    Posts
    4,867
    Mentioned
    74 Post(s)
    Quoted
    1663 Post(s)

    Default

    Thanks NKN and Nebula! Silly mistake

Thread Information

Users Browsing this Thread

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

Posting Permissions

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