Author Topic: Syntax error that doesn't make sense  (Read 878 times)

I got an error saying this:


package StudGuard_Version
{
            function GameConnection::AutoAdminCheck(%this)
            {
^    parent::AutoAdminCheck(%this);
^    messageClient(%this,'',"\c3This server is currently running StudGuard Version\c6" SPC "0.0.1".");
##
##             }
}


Can someone help me?

The line with the error is this one:
messageClient(%this,'',"\c3This server is currently running StudGuard Version\c6" SPC "0.0.1".");

The error is the "." part. Remove the last ." and it should work.

AutoAdminCheck is designed to return a value so that the server knows what level of admin to give the client. You will need to add a return statement to keep the function working properly, like this:

return parent::AutoAdminCheck(%this);

Note that a return statement will immediately end the function, so any code after a return will not execute.

The line with the error is this one:
messageClient(%this,'',"\c3This server is currently running StudGuard Version\c6" SPC "0.0.1".");

The error is the "." part. Remove the last ." and it should work.
my bad :/