511
Modification Help / Re: My mod gets a syntax error.
« on: January 07, 2014, 11:37:43 PM »It does feel random, but basically what you're doing is creating an object à la new Class(); - which requires a semicolon. However, TorqueScript allows you to define tagged fields (or maybe member fields? Whatever) by adding a pair of curly braces.I've worked with code before, but you didn't have to add a semicolon after you close your code.
However you're still ultimately just calling new Class();, so you still need a semicolon at the end. How this explains packages, I don't know.
And yes, this means you can do things like BotGroup.add(new AIPlayer() { datablock = PlayerNoJet; position = BotGroup.spawnPos; });.