Blockland Forums > Modification Help
My scripting problems: 0
Sammygood:
Thanks! It seems i keep on missing little things... :cookieMonster:
Now its working.
lordician:
--- Quote from: Sammygood on June 02, 2010, 06:07:35 AM ---Thanks! It seems i keep on missing little things... :cookieMonster:
--- End quote ---
I know all about it. ;)
Sammygood:
Updated.
Sammygood:
Wait, why on earth doesnt it do anything!!!???
I type /test then it doesnt do anything.
When i type exec("config/Test.cs"), it says that it is working(no syntax error) then when i type /test it does nothing!
lordician:
Haha, i just noticed the wrong use of =.
Put in two of them when you try to compare things.
For more information i would like to refer you to the toque functions guide that is also in the sticky (Article A.1.4.).
So it would be:
--- Code: ---%toggletest = 0;
function servercmdtest(%client)
{
if (%toggletest == 0)
{
messageAll("ToggleTest has been turned /c2ON.");
%toggletest = 1;
}
else if (%toggletest == 1)
{
messageAll("ToggleTest has been turned /c2OFF.");
%toggletest = 0;
}
}
--- End code ---