Results 1 to 5 of 5

Thread: Breaking or ending a script

  1. #1
    Join Date
    Jul 2008
    Posts
    36
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Breaking or ending a script

    If an error in a script occurs (i.e. object that was supposed to be in someone's bank but isn't), how do I make the script break out of a loop and end?

  2. #2
    Join Date
    Apr 2007
    Location
    Colchester, UK
    Posts
    1,220
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    Exit

    that should do it for you

  3. #3
    Join Date
    Jul 2008
    Posts
    36
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks. I don't need a semicolon after it or anything?

  4. #4
    Join Date
    Apr 2007
    Location
    Colchester, UK
    Posts
    1,220
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    oh yes sorry forgot to add the ;

    so its just
    SCAR Code:
    Exit;

  5. #5
    Join Date
    Feb 2006
    Location
    With mooncow on the moon
    Posts
    292
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Code:
    TerminateScript;
    This when calls immerdiatly terminates the enitre script. If its a repeat that is looping and not functioning correctly then you could add a counter, say -

    Code:
    Repeat
    do something
    so eomthing else
    X:= X + 1
    If(x>1000)Then Break;
    Or you could even use timing

    Code:
    MarkTime(Mark);
    If(TimeFromMark(Mark) > 60000);
    many options to consider.
    ~ Solemn Wishes

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 5
    Last Post: 02-07-2009, 11:31 PM
  2. ending the script
    By cloutier15 in forum OSR Help
    Replies: 23
    Last Post: 05-11-2008, 01:01 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
  •