Results 1 to 3 of 3

Thread: NextPlayer

  1. #1
    Join Date
    Nov 2011
    Posts
    1,532
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default NextPlayer

    I have searched and read an old thread here - http://villavu.com/forum/showthread....ght=nextplayer

    The thing that I just don't understand is why does it leave the script in an infinite loop when all players are inactive. Why doesn't it just terminate the script? I am asking because this traps scripts inside infinite loops when it seems unnecessary and it somewhat hinders restarting with SMARTManager/CrashSMART.

    Would be nice if devs could explain why the code is made that way Btw it's 2012, will there be any chance this is possibly changed?
    Current activity: Recovering from vacation
    - Nulla pars vitae vacare officio potest -
    SRL membership? Can I buy that?
    Scripts - AGS - SWF - WAR - EMS - W100S-EM
    If you need scripting help, you can pm me. Remember, if you need help you have to ask for it properly though

  2. #2
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    In that same thread RM shows how to avoid the infinite loop.

  3. #3
    Join Date
    Nov 2011
    Posts
    1,532
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by mormonman View Post
    In that same thread RM shows how to avoid the infinite loop.
    Ah missed that! Was never used to looking at .SCAR code blocks. Just thought it's something else ;)

    Simba Code:
    SRL_Procs[srl_InNextPlayerLoop] := @ScriptTerminate;
    //then this will make some sense
     if (SRL_Procs[srl_InNextPlayerLoop] <> nil) then
          SRL_Procs[srl_InNextPlayerLoop]();

    Thanks mormonman!
    Current activity: Recovering from vacation
    - Nulla pars vitae vacare officio potest -
    SRL membership? Can I buy that?
    Scripts - AGS - SWF - WAR - EMS - W100S-EM
    If you need scripting help, you can pm me. Remember, if you need help you have to ask for it properly though

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
  •