That's strange, the code you posted is completely valid as far as I'm aware and I had no issue with it not stopping the dryhump animation when testing it on my server. If no one else figures it out tomorrow I'll keep fiddling with it.
I get the parameters part, but what do you mean by the parenthesis?
He means you forgot to add parentheses and parameters inside after your function name.
function servercmdNormal(%client)
{
%client.player.playThread(3,"activate");
%client.player.schedule(33,playThread,3,"root");
}
If you open a parentheses or bracket in TorqueScript and forgot to close it, the TorqueScript interpreter won't understand your code when it comes the time to read it and therefore it won't be able to run. You'll also get something like this output to your console:

This is what's called a syntax error. Another example of one would be because I opened a parentheses after "
theWrongWay", put in a parameter, and didn't close it. Oops, I also forgot an opening bracket! stuff!:
function theWrongWay( %something // <<< no closing parentheses )-:
{
doTheRightThing();
}
function alsoIncorrent( %something ) // <<< no opening bracket :-{
return %something SPC "Where is that opening bracket?!!";
}
This code however, is good to go, because I closed the parentheses and brackets:
function theWrongWay( %something )
{
doTheRightThing();
}
function alsoIncorrent( %something )
{
return %something SPC "Where is that opening bracket?!!";
}
Also, while I'm at it, I'd like to point out that it's good practice to check if an object exist before you call methods on it. Otherwise the console will complain about a missing object that has been referenced somewhere in your code. Let's put this into a simple example, lets say I declared a server command called "
superSizeMe", and as the name implies, when it gets invoked, the invoking client's player will become big.
You could just write it like this:
function serverCmdSupersizeMe( %client )
{
%client.player.setScale( "5 5 5" );
}
But what if the person who typed the command is still in the loading phase, or is dead? Well you'd see something like this output to your console:

This happens because you're trying to called setScale (A method) on a player (an object) which doesn't exist.
So... how would you fix this? Well, that's simple, you would use the "
isObject" function. You pass this function something that could be an object-id or object name and it will return true if what you passed it is an object, and false if it's not. So let's re-implement our "
superSizeMe" server command:
function serverCmdSupersizeMe( %client )
{
if( isObject( %player = %client.player ))
{
%player.setScale( "5 5 5" );
}
}
Boom! Now the code wont spam my console if something doesn't go the way I expected it to!
%client.player isn't a function, no () after it.
woops thanks for catching that!