Shoutbox

pause script without MsgPlus object - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: pause script without MsgPlus object (/showthread.php?tid=69355)

pause script without MsgPlus object by Baggins on 12-11-2006 at 12:46 AM

what i want to do is just pause the execution of my script for a teeny weenie bitty of time then pickup where i left off


RE: pause script without MsgPlus object by Spunky on 12-11-2006 at 12:49 AM

Don't think it's possible without freezing WLM


RE: pause script without MsgPlus object by Baggins on 12-11-2006 at 12:52 AM

but i could just do the crap loop thingy?

like

code:
for(i=1;i<100;i++)
{

}

RE: pause script without MsgPlus object by Spunky on 12-11-2006 at 12:57 AM

possibly, but you don't know how long it'll last for each person and it's a crap way to go about it


RE: pause script without MsgPlus object by matty on 12-11-2006 at 12:57 AM

Why not use a Timer?


RE: RE: pause script without MsgPlus object by Baggins on 12-11-2006 at 12:59 AM

quote:
Originally posted by Matty
Why not use a Timer?

i guess i will have to

and also this function:
code:
split (Cmd, Param1, Param2)
{
    prams = Cmd.split(" "); // Split the incoming message into
                                // the different parameters
    for  (pram in prams)        // Loop through parameters
    {
        switch(pram)                 
        {
            case "0":                // First parameter is the command
                break;            // itself, do nothing with that
            case "1":
                Param1 = params[param];
            default:
                Param2 += " " + prams[pram]; // Construct the message to send with /me
                break;
        }
       
    }
   
}

gets the error:

code:
Error: 'Cmd' is undefined.
       Line: 71. Code: -2146823279.


EDIT: shit!

i just realised missing function keyword, sorry
RE: pause script without MsgPlus object by CookieRevised on 12-11-2006 at 01:32 AM

Whenever you want to pause the code in your script, you should ask yourself the question: Why and do I really need to?

The point is that almost always you do not need to, and pausing code is actually bad programming.

So...

Why do you want to pause the script?

and that split function is highly dodgy too. Even if you manage to get no errors when it is executed, it wouldn't even work as parameters of function are passed by value not by reference. So, what is the purpose of that function?