Author Topic: rude syntax error i don't understand  (Read 364 times)

alright i'm probably going to seem dumb, but what the hell is up with this:
Quote
messageall('',"<color:fff000>"@ %client SPC "<color:ffffff>rolled" SPC getrandom(1,6));
it's giving me a syntax error for that one specific line. why?

Error reports don't indicate the error where the actual error is, but where the Torquescript parser realized there was a problem
Syntactically, there's nothing wrong with that line, so the error is somewhere before that
However, unless %client is already defined as the name, you need to use %client.getPlayerName()

Error reports don't indicate the error where the actual error is, but where the Torquescript parser realized there was a problem
Syntactically, there's nothing wrong with that line, so the error is somewhere before that
However, unless %client is already defined as the name, you need to use %client.getPlayerName()
I can't just use %client =%client.name?
also, here's the whole function:

I can't just use %client =%client.name?
%client.getplayername() is preferred over %client.name
Reason being %client.name is a Torquescript field with nothing to prevent some moron changing it.
%client.getplayerName() reads a different, engine-accessible-only field with no public setter. So you can count on it always being correct.


The problem is that line, and the two brackets following it, aren't inside the function.
« Last Edit: March 15, 2015, 02:14:02 PM by Headcrab Zombie »