Results 1 to 4 of 4

Thread: Noob "case" Q.

  1. #1
    Join Date
    Jul 2006
    Location
    NY
    Posts
    371
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Noob "case" Q.

    ok, Im using a case statement, but it doesnt seem to be working.
    I want it to wither move the compass 'E', or 'W'. But its only moving it 'E'.
    This is what my case statement looks like.
    SCAR Code:
    case Random(2) of
        0: MakeCompass('W');
        1: MakeCompass('E');
      end;
    That looks like it would work, but its not and im confused. Is there any other way I can do this? Thanks.
    - Jr

  2. #2
    Join Date
    Oct 2006
    Location
    I'm a figment of your imagination
    Posts
    422
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Have you tried it long enough? It may be that it produces 1 the first 100 times, and 0 the second 100 times (or opposite way).

    Try making it something like below:

    SCAR Code:
    If random(100)+1 > 50 then
      MakeCompass('W')
    else
      MakeCompass('E');

    It's been a while... but I'm BACK!!!

  3. #3
    Join Date
    Jul 2006
    Location
    NY
    Posts
    371
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hmmm that looks like it would work. Ill try that out, but if anyone knows why my case isnt working, help me out on that.

  4. #4
    Join Date
    Feb 2006
    Location
    London, England
    Posts
    2,045
    Mentioned
    2 Post(s)
    Quoted
    0 Post(s)

    Default

    something is wrong with MakeCompass then
    SRL Wiki | SRL Rules | SRL Stats
    Ultimate SCAR Scripting Tutorial | Starblaster100's Auth System | Join the official SRL IRC now!


    Help Keep SRL Alive! Please disable Advert Blockers on SRL! Help Keep SRL Alive!


Thread Information

Users Browsing this Thread

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

Similar Threads

  1. A nicer way to do a "case"
    By CheetahNub in forum OSR Help
    Replies: 13
    Last Post: 10-16-2007, 07:12 PM
  2. Need Help With Using "Case" and "Of"
    By Tootoot222 in forum OSR Help
    Replies: 2
    Last Post: 08-12-2007, 06:51 PM
  3. action="www.site.com" method="post"
    By Jason2gs in forum General
    Replies: 4
    Last Post: 05-17-2007, 11:50 PM
  4. Replies: 3
    Last Post: 04-19-2007, 03:44 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
  •