Results 1 to 4 of 4

Thread: halp with case of

  1. #1
    Join Date
    Jul 2007
    Posts
    217
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default halp with case of

    I need help with 'case of' First of all, What does it do? I mean i know it chooses a certain situation i guess i could call it, but I keep getting a syntax error. Can someone post an example of how it would be used? I'm trying to make a function to get a random percent. I don't know if that is what case of does, but I need one for another script i am working on. The function isn't complicated, it just chooses a random number and uses it for a script. So help please?

  2. #2
    Join Date
    Oct 2006
    Posts
    1,211
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    case Random(5) of
      0: Blah
      1: Blah;
      2: Blah;
      3: Blah;
      4: Blah;
    end;

    Thats an example of a case of ranom number
    Random(5) would eb 20% chance for each one. =]

    So what this will do is make a Random number(0-4), then do something depending on what that number is, i.e. 0:, 1:, 2:, etc...
    Extinct.

    Formally known as Drags111.

  3. #3
    Join Date
    Jul 2007
    Posts
    217
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thank you i dont have to make this function now

    also you will have thanks in my script when i am done with it.

  4. #4
    Join Date
    Oct 2006
    Posts
    1,211
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    No problem any time! Good luck with your script!
    Extinct.

    Formally known as Drags111.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. halp
    By weetsie2 in forum OSR Help
    Replies: 8
    Last Post: 10-18-2008, 11:05 AM
  2. Halp? SMART
    By isjusme in forum OSR Help
    Replies: 2
    Last Post: 05-05-2008, 09:53 PM
  3. halp
    By neo_welmeow in forum News and General
    Replies: 3
    Last Post: 04-16-2007, 07:08 AM

Posting Permissions

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