The Dink Network

Reply to Re: Scripting Help

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
June 2nd 2007, 03:57 AM
slimeg.gif
metatarasal
Bard He/Him Netherlands
I object 
It's the engine.

What's the engine? I'm pretty sure that will work, just try it. I'll try to explain it, this was the old structure, with &sseller starting out as 0:

//&sseller is 0 so this will be true:
if (&sseller == 0)
{
say("sseller0 executing...",1);
//now set &sseller to 1:
&sseller = 1;
}

//because we just set &sseller to 1 this is true too:
if (&sseller == 1)
{
say("sseller1 executing...",1);
//now set &sseller to 2:
&sseller = 2;
}

///////////////////////////////////////
This is the new structure:

//&sseller is 0 so this will be false:
if (&sseller == 1)
{
say("sseller1 executing...",1);
//now set &sseller to 2:
&sseller = 2;
}

//&sseller is 0 so this will be true
if (&sseller == 0)
{
say("sseller0 executing...",1);
//now set &sseller to 1:
&sseller = 1;
}

As you see in the second structure only the needed part will be executed, just try it. Remember that a script is not run in a random order but from the beginning to the end.

<EDIT> Znex, your solution might be shorter but it makes it harder to read through. And is gokussj6 ever wants to extend this script further it won't work anymore...