I am trying to get this simple script, which when someone tries to toggle their player light, it checks whether they're admin, enabling the light when they are, otherwise returning a chat message.
The game claims the error is at the last line of the script, but I see nothing.
Is it because I falsely attempted to pack the meat of the script in a single line?
Here's the whole thing:
package NoPlayerLight
{
function servercmdLight(%client)
{
if(%client.isAdmin) Parent::servercmdLight(%client); else messageClient(%client,'',"Player lights are disabled for non-admins.");
}
};
activatePackage(NoPlayerLight);