Results 1 to 3 of 3

Thread: Random debug talker help

  1. #1
    Join Date
    Feb 2007
    Posts
    849
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Random debug talker help

    just trying to get the feel of scar, this (well should) just typs random stuff into the debug box

    not RS use really but oh well, its helping learn scar to do RS stuff



    SCAR Code:
    Program RandomDebugTalker;
     
     
    procedure Talk;
    begin
    I := random(7);
    case I of
    0 : Writeln('hi');
    1 : Writeln('bored');
    2 : Writeln('random');
    3 : Writeln('gotcha');
    4 : Writeln('pizza');
    5 : Writeln('wassup');
    6 : Writeln('wazzup');
    end;
     
     
    begin Talk;
    repeat
    Example;
    wait(1000);
    End.

    have i made a really noobish mistake i.e begins/ends

  2. #2
    Join Date
    Jan 2007
    Posts
    834
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Code:
    Program RandomDebugTalker;
    
    var
    I : integer;
    
    procedure Talk;
    begin
    I := random(7);
    case I of
    0 : Writeln('hi');
    1 : Writeln('bored');
    2 : Writeln('random');
    3 : Writeln('gotcha');
    4 : Writeln('pizza');
    5 : Writeln('wassup');
    6 : Writeln('wazzup');
    end;
    end;
    
    
    begin
    repeat
    Talk;
    wait(1000)
    until(false)
    End.
    All you were missing was a integer for the I in the random,
    The end; after the procedure and After wait(1000) there is no semicolon.
    and after every repeat needs an until
    until(false) will keep repeating forever.
    There are other untils like variables and other stuff.

  3. #3
    Join Date
    Feb 2007
    Posts
    849
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    cheers man
    ________________________________________
    14:19 < cycrosism> I wonder what she would have done without it
    14:19 < cycrosism> without me*
    Cycrosism is now an it.
    Quote Originally Posted by Dervish View Post
    /Facedesk.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. debug talker
    By HarryJames in forum First Scripts
    Replies: 2
    Last Post: 12-05-2007, 06:30 AM
  2. first script Random Facts Talker
    By sweetleaf in forum First Scripts
    Replies: 2
    Last Post: 06-23-2007, 09:06 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
  •