Results 1 to 4 of 4

Thread: How to select different procedures in script

  1. #1
    Join Date
    Nov 2011
    Location
    Australia
    Posts
    418
    Mentioned
    2 Post(s)
    Quoted
    86 Post(s)

    Default How to select different procedures in script

    Hi guys I I tried to do this in the main loop ina script and put //infront of the one the user will want to use, although it does work, I want something betterthan this. Does anybody know how to make say in the Const that the user can declare what rock they want to be mined or such?

    Thanks.

  2. #2
    Join Date
    Jan 2012
    Posts
    2,568
    Mentioned
    35 Post(s)
    Quoted
    356 Post(s)

    Default

    Simba Code:
    Const
      Rock:= 'iron';  //input the rock u want to mine

    //then in the procedure....
    Case Rock of
    'iron': blabla
    'gold':blabla
    end;
    You can take a look at http://villavu.com/forum/showthread.php?t=83612 to see how i deal with them (eg. the special attack)

  3. #3
    Join Date
    Mar 2012
    Posts
    690
    Mentioned
    2 Post(s)
    Quoted
    40 Post(s)

    Default

    Simba Code:
    Const
      Method := 'Iron';

     Case Lowercase(Method) of
        'iron':
        begin
          Blablabla;
        end;

        'coal':
        begin
         Blablabla;
        end;

    Much neater

  4. #4
    Join Date
    Nov 2011
    Location
    Australia
    Posts
    418
    Mentioned
    2 Post(s)
    Quoted
    86 Post(s)

    Default

    Thanks to Riwu and Sirenia, Riwu been answering a lot of my questions lately Thanks mate.

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
  •