Author Topic: Can someone fix this syntax error?  (Read 1761 times)

Code: [Select]
Add-Ons/Script_AntiPerma/server.cs Line: 13 - Syntax error.
>>> Some error context, with ## on sides of error halt:
^^if(%c.isAdmin && %t $= "-1" && !%c.isSuperAdmin)

^^{

^^^messageClient(%c, '', "ERROR\c6: You are not allowed to permanently ban clients as an administrator on this server!");

^^^return;

^^}

^^return parent::serverCmdBan(%c, %o, %i, %t, %r);

^}

};

activat##
>>> Error report complete.
« Last Edit: May 07, 2012, 06:08:05 PM by ScratchTehEPICSpaceDude »

full code coming right up:
Code: [Select]
package antiperma
{
function serverCmdBan(%c, %o, %i, %t, %r)
{
if(%c.isAdmin && %t $= "-1" && !%c.isSuperAdmin)
{
messageClient(%c, '', "ERROR\c6: You are not allowed to permanently ban clients as an administrator on this server!");
return;
}
return parent::serverCmdBan(%c, %o, %i, %t, %r);
}
};
activatepackage(antiperma);

Everything is simply flawless, it just seems to not be reading the whole file.

Did you write 'activatePackage(packagename);' or just 'activat'?

Did you write 'activatePackage(packagename);' or just 'activat'?

We wrote it out.

Is that file being exec'd manually? Is that literally the entire file? Is the file in ASCII? Does it have Unix line endings or Carriage Return endings?

Is that file being exec'd manually? - Yes
Is that literally the entire file? - not the syntax error
Is the file in ASCII? - idk
Does it have Unix line endings or Carriage Return endings? - idk

No I mean has the entire file been posted?

Which editor do you use?

No I mean has the entire file been posted?

Which editor do you use?

No.

Notepad. But lugnut wrote the script.

No I mean has the entire file been posted? - yes

Which editor do you use? - notepad++, disregard scratch, he isn't coding this
Is that file being exec'd manually? -apparently, despite it being a functional add-on
Is that literally the entire file? -that that i posted above is, yes.
Is the file in ASCII? -yes, presumably
Does it have Unix line endings or Carriage Return endings? - carriage return



The reason i exec'd is that my server was running while you gave me the new file.


Is it in a .zip?
yes

he probably didn't setModPaths(getModPaths()); and it's only reading a certain part of the file.
The reason i exec'd is that my server was running while you gave me the new file.
he didn't tell me this^

Can you take it out of the zip and see if it works? Maybe the zip got corrupted.

I think the zip is fine.
I think blockland is trying to read X bytes of data, when it's actually Y bytes longer thanks to a modification I made.

Therefore, blockland is only getting X out of X+Y data, and loving up.

Oh crap! I forgot! I archived it with 7zip!