You can omit the parentheses if the name doesn't contain any special characters:
The @ is also always unnecessary, it's a bad habit that I'm afraid I helped popularize:
PHP Code:
("-Something/With/Weird/Characters!").foobar(); // works fine
Personally, I don't see any reason to use the findWeapon syntax. Usually for weapons that I want other scripts to call, I wouldn't worry too much about the name (e.g.
-HealthSystem), and instead do something like:
PHP Code:
//#CLIENTSIDE
function onCreated() {
Health = this;
}
...with the idea of it being better to be explicit rather than implicit (other scripts can now do Health.foobar()).
The (minimal) added benefit is that you can avoid using parentheses (no dashes), you're reminded that other scripts might be calling it, and you avoid trouble with renames.
There might be some benefit to the
findWeapon syntax in that you can avoid conflicts between other objects, but I've never really seen that happen in all the time I was coding.