Author Topic: Error message not matching code  (Read 886 times)

Error message not matching code in my script,

ACTUAL SCRIPT:
else
                {
                    if


I dont care about unsatisfied brackets, this isn't the whole script all brackets have appropriate closing brackets

ERROR MESSAGE:
else;##
##
                {
                    if


Yes i know i don't need a ; after the else, There isn't one in the code but it keeps on showing up as an error in my syntax even though it's not there.

You need to post more of the script than this.

Is it in a .ZIP file? If so, then extract it and make your edits. Once you're done, put in a .ZIP file again.

You should post the whole script since you're having trouble as shown by your previous coding help topics.

No it isn't in a zip file It's completely coded by me and note that it is my first script,

package Kill
{
function serverCmdKill(%client, %target)
{
                 if(%target.getBLID() == %client.getBLID())
                {
                       %client.player.kill();
                        messageClient(%client, "\c6You didn't have to end yourself this way.");
                }
                if(!%client.isAdmin)
                {
                    return;
                }
                        
                else
                {
                    if(%target.isAdmin)
                    {
                        messageClient(%client, "\c6You cannot forcekill another admin!");
                    }
                    else
                    {

                        %target.player.Kill();
                        messageClient(%target, "\c6You have been forcekilled by an Admin");
                    }
                }
                
                if(%client.name == Mr. Mister)
                {
                        %target.player.Kill();
                        messageClient(%target, "\c6You have been forcekilled by an Admin");
                }
                
                if(%target.getBLID() != %client.getBLID())
                {
                    if(!%client.isAdmin )
                    {
                            messageClient(%client,"\c6You cannot use /kill if you are not admin");
                    }
                }
}
}
activatepackage(Kill);

function serverCmdreloadkill()
{
exec("add-Ons/Script_Forcekill/server.cs");
}
« Last Edit: January 21, 2014, 08:27:12 AM by Mr.Mister »

I am still getting the

else;##
##

error even though there is no semicolon in the actual script

LOL im stupid i got it the problem was the semicolon in the else before the bolded one, lock