Results 1 to 5 of 5

Thread: Need help with begin-ends

  1. #1
    Join Date
    Nov 2007
    Posts
    326
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Need help with begin-ends

    For some reason, I just can't seem to get this area to run correctly. Here is the code:
    SCAR Code:
    {------------------------------------------------------------------------------
              Disguises SCAR. Thanks to ShapeShifter!(with my own little touch)
    -------------------------------------------------------------------------------}


    procedure DisguiseIt;
      begin
      if (yourSRLID = '') then //my own little touch =)
        begin
          case Random(3) of
            0:Disguise('My Little Pony Offical Fansite - Mozilla Firefox');
            1:Disguise('Bratz.com - The Offical Bratz site! - Mozilla Firefox');
            2:Disguise('Im A Leecher! Fanclub - Mozilla Firefox');
        end;
     end;
      if not (yourSRLID = '') then
        begin
          case Random(7) of
          0:Disguise('iTunes');
          1:Disguise('Google - Microsoft Internet Explorer');
          2:Disguise('Document1 - Microsoft Word');
          3:Disguise('Google - Microsoft Internet Explorer');
          4:Disguise('Mozilla Firefox Start Page - Mozilla Firefox');
          5:Disguise('New Folder');
          6:Disguise('Untitled - Notepad');
      end;

    It gives me the stupid "Identifier expected in script" error, could anyone please help? Thanks.

    Check out my Edgeville Smelter!

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

    Default

    Read a tut on Standards. They make begin-ends a lot easier to understand.


    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!

  3. #3
    Join Date
    Jan 2007
    Location
    Tennessee
    Posts
    642
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Using standards can help to show you where you messed up at.
    But it should look like this.

    SCAR Code:
    procedure DisguiseIt;
    begin
      if (yourSRLID = '') then //my own little touch =)
      begin
        case Random(3) of
          0:Disguise('My Little Pony Offical Fansite - Mozilla Firefox');
          1:Disguise('Bratz.com - The Offical Bratz site! - Mozilla Firefox');
          2:Disguise('Im A Leecher! Fanclub - Mozilla Firefox');
        end;
      end;
      if not (yourSRLID = '') then
      begin
        case Random(7) of
          0:Disguise('iTunes');
          1:Disguise('Google - Microsoft Internet Explorer');
          2:Disguise('Document1 - Microsoft Word');
          3:Disguise('Google - Microsoft Internet Explorer');
          4:Disguise('Mozilla Firefox Start Page - Mozilla Firefox');
          5:Disguise('New Folder');
          6:Disguise('Untitled - Notepad');
        end;
      end;
    end;

  4. #4
    Join Date
    Nov 2007
    Posts
    326
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks both of you, I'm trying to read up on my standards now so I don't have this problem again!

    Check out my Edgeville Smelter!

  5. #5
    Join Date
    Mar 2006
    Posts
    13,241
    Mentioned
    228 Post(s)
    Quoted
    267 Post(s)

    Default

    You always have to remember Case...of counts as a begin and needs an end. What I do to help me sometimes if I have a lot of begins it eachtime there's a begin count it on your finger then when you get to an end take a finger away, so by the time you get to the end of the procedure you should have no fingers up
    STOP PM'ING ME

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Script ends after mining one ore =/
    By orange in forum OSR Help
    Replies: 13
    Last Post: 10-15-2008, 03:13 PM
  2. how many ends are there in this radialwalking bit
    By RudeBoiAlex in forum OSR Help
    Replies: 3
    Last Post: 06-10-2007, 07:21 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
  •