Blockland Forums > Modification Help
Help with syntax errors please...
darerd:
So I'm making a script, that every time a non-SA spawns(or respawns), they get their playertype turned into no-jet.
Problem is, there's a syntax error somewhere that I can't seem to track down. It's probably in the RTB prefs, but I'm not exactly sure.
--- Code: ---package(jetStealer)
{
function onSpawn(%obj, %client)
{
if(!%client = superAdmin)
{
%obj.changeDataBlock(noJetPlayer);
CommandToClient(%client, 'BottomPrint', "\c3Your jets have been taken away.", 3);
}
echo("The script is working.");
}
};
if(enableJetStealer = 1)
{
activate package(jetStealer);
}
else
{
deactivate package(jetStealer);
}
if(isFile("Add-Ons/System_ReturnToBlockland/server.cs"))
{
if(!$RTB::RTBR_ServerControl_Hook)
{
exec("Add-Ons/System_ReturnToBlockland/RTBR_ServerControl_Hook.cs");
}
RTB_registerPref("Enable Jet Stealer","Jet Stealer","enableJetStealer","bool","Script_Mychallengescriptasdf",1,0,0);
}
else
{
$enableJetStealer = 1;
}
--- End code ---
Please help if you can, if you can't, thanks anyways.
MegaScientifical:
package(jetStealer)
darerd:
--- Quote from: MegaScientifical on February 21, 2011, 01:34:45 AM ---package(jetStealer)
--- End quote ---
I'm not seeing what's wrong with those parentheses there, please explain it.
MegaScientifical:
--- Quote from: darerd on February 21, 2011, 01:38:18 AM ---I'm not seeing what's wrong with those parentheses there, please explain it.
--- End quote ---
There shouldn't be parentheses there. Just a space between package and the package's name.
package jetStealer
darerd:
--- Quote from: MegaScientifical on February 21, 2011, 01:45:18 AM ---There shouldn't be parentheses there. Just a space between package and the package's name.
package jetStealer
--- End quote ---
Okay,so I did that, and the script is still broken, so if that was a problem it wasn't the only one.