Blockland Forums > Modification Help
This is annoying me, serverCmd Error?
Pew446:
Every time I run this:
serverCmdSave(%client){
%varg = %client.brickGroup.vargroup;
for(%vars=0;%vars < $numvars;%vars++){
%name = $saveload[%vars];
%varg.saveVariable("Client", %name, %client);
}
commandtoclient(%client,'centerPrint',"\c6Your progress has been saved!",3);
}
The console gives me this:
Syntax Errors with ## On both sides of error halt.
serverCmdSave(%client){#
#
%varg = %client.brickGroup.vargroup;
for(%vars=0;%vars < $numvars;%vars++){
%name = $saveload[%vars];
%varg.saveVariable("Client", %name, %client);
}
commandtoclient(%client,'centerPrint',"\c6Your progress has been saved!",3);
}
I see no syntax errors, and the lines above have none either. Please help.
Syntax:
--- Quote from: Pew446 on August 21, 2010, 05:05:49 AM ---Every time I run this:
serverCmdSave(%client){
%varg = %client.brickGroup.vargroup;
for(%vars=0;%vars < $numvars;%vars++){
%name = $saveload[%vars];
%varg.saveVariable("Client", %name, %client);
}
commandtoclient(%client,'centerPrint',"\c6Your progress has been saved!",3);
}
The console gives me this:
Syntax Errors with ## On both sides of error halt.
serverCmdSave(%client){#
#
%varg = %client.brickGroup.vargroup;
for(%vars=0;%vars < $numvars;%vars++){
%name = $saveload[%vars];
%varg.saveVariable("Client", %name, %client);
}
commandtoclient(%client,'centerPrint',"\c6Your progress has been saved!",3);
}
I see no syntax errors, and the lines above have none either. Please help.
--- End quote ---
you are missing a function functionname()
you just have functionName()
and in the future, can we make our code a bit more neat?
--- Code: ---function serverCmdSave(%client)
{
%varg = %client.brickGroup.vargroup;
for(%vars=0;%vars < $numvars;%vars++)
{
%name = $saveload[%vars];
%varg.saveVariable("Client", %name, %client);
}
commandtoclient(%client,'centerPrint',"\c6Your progress has been saved!",3);
}
--- End code ---
Pew446:
Good hell I'm tired.
Thanks for quick reply! :D!
Oh stuff I need sleep :C
Syntax:
Lol, dont worry, ive done that too, lol
Pew446:
--- Quote from: Syntax on August 21, 2010, 05:11:58 AM ---Lol, dont worry, ive done that too, lol
--- End quote ---
Hehe, your name is syntax.... :P