Author Topic: Unexplainable syntax error?  (Read 1013 times)

I'm getting a strange syntax error at the beginning of my script.



Yes, my script has a p at the beginning. Yes I saved it. I don't know why it's removing the p, or if that's just some formatting thing, or if it even matters. Either way, I can't really explain this syntax error.

This is caused by the zip file not being updated.

Try entering this into the console and then executing:
discoverFile("Add-Ons/Script_DeadRPChat.zip");

(Capitalization not necessary)

You can't put a call function inside a package.

package cake
{
      LoadSomething(); //Functions like this cannot be in the package

      function cakes() //This is a registering function
      {
            messageAll('',"Cakes!");
      }
};
activatepackage("cake");
cakes(); //This function works fine since it is out of the package

It gives it errors for some odd reason, and putting a capital on Package makes an error as well, not sure why.
« Last Edit: November 28, 2013, 04:20:47 PM by Advanced Bot »

Derp, how did I miss that... Ignore what I said.

it's much easier if you post all of your code in text format, since it is much harder and less helpful to read the glitchy syntax error detection in torque

Also I don't know if this is right but I don't see a P in the package

Also I don't know if this is right but I don't see a P in the package
it's cause the torque syntax error highlighting only shows so much of the code and why I said you should post all of your code in text format

it was advanced bot's solution. apparently you can't do function calls in package code. locking now