I have a problem:Parent:##:##onPlayerTouch(%client, %this, %player, %stuff);I see nothing wrong with this.
packages aren't used inside code blocks...basically they're only used for mods or to edit previously existing functions, and they don't necessarily contain methods...The syntax was right, for the most part:Code: [Select]package <Package Name> { <Functions (or methods) go here>};after you activate a package, any functions you re-wrote inside the package (that already existed) overwrite the previously existing one. You can call the code in the previously existing function (i.e. the function that was created outside the package) by using Parent::
package <Package Name> { <Functions (or methods) go here>};
You're obviously confusing yourself with other languages, when you make a function; the bracket goes on a new line under the function, not in front of it. Please check your work and make sure it's not a comparasin to another language, so other people don't start learning another language and wondering why the crap they script doesn't work.
Dude, that quote is about three years old.
function do_crap (%hello ,%there ){crash (); quit(); }
TorqueScript is a flexible language in the way that the following is entirely valid code:Code: [Select] function do_crap (%hello ,%there ){crash (); quit(); }You can write however you want. It's a personal preference.
THE UGLY
This topic is old
ServerCmdMessageSent(FindClientByName("%1"), ("blah blah blah");
Would I need to package it if I used this?Code: [Select]ServerCmdMessage(FindClientByName("%1"), ("blah blah blah");
ServerCmdMessage(FindClientByName("%1"), ("blah blah blah");
You know what I mean.
Pointless, someone can just read your code, extract said function, and overwrite your function altogether with their new methods.
exec('example.cs');