Results 1 to 3 of 3

Thread: Identifier expected error

  1. #1
    Join Date
    Mar 2013
    Location
    India
    Posts
    12
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Identifier expected error

    I'm making a script(learning to make one, atleast) and I've got this puzzling error. I don't understand what I've done wrong. Could someone please help me out ?

    Code:
    program New;
    {$DEFINE SMART}
    {$i srl/srl.simba}
    
    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
    
      Players[0].Name :='';
      Players[0].Pass :='';
      Players[0].Nick :='';
      Players[0].Active := True;
    end;
    
    procedure Antiban;
      begin
      if(not(LoggedIn)) then
        Exit;
      case Random(1000) of
        1..10: MakeCompass(255 - Random(30));
        20..30: MakeCompass(255+Random(30));
        30..40: HoverSkill(skill_mining,false);
        40..50: HoverSkill(skill_attack,false);
        50..60: HoverSkill(skill_defence,false);
        60..70: HoverSkill(skill_agility,false);
        70..80: HoverSkill(skill_farming,false);
        80..90: HoverSkill(skill_herblore,false);
        90..100: HoverSkill(skill_smithing,false);
        100..110: HoverSkill(skill_summoning,false);
        110..120: HoverSkill(skill_dungeoneering,false);
        120..130: HoverSkill(skill_magic,false);
        130..140: wait(3000+ Random(250));
        140..150: MakeCompass('N');
        150..160: MakeCompass('S');
        160..170: MakeCompass('E');
        170..180: MakeCompass('W');
        180..190: PickUpMouse;
        190..200: HoverSkill(skill_fletching,false);
        200..210: wait(4000+ Random(1000));
    end;
    
    begin
      SetUpSRL;
      ActivateClient;
      DeclarePlayers;
      LoginPlayer;
    end.
    It gives an error:
    Code:
    [Error] (50:4): Identifier expected at line 49
    Thank you!

  2. #2
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    case Random(1000) of

    needs an end;

    so
    Simba Code:
    190..200: HoverSkill(skill_fletching,false);
        200..210: wait(4000+ Random(1000));
      end;    // this one :)
    end;

    Ninja'd u yeww!

    Creds to DannyRS for this wonderful sig!

  3. #3
    Join Date
    Mar 2013
    Location
    India
    Posts
    12
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Oh, thank you! I understand now.

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
  •