Game Development Community

Issue with GettingStarted.pdf

by eedok - Cody Hollis-Perdue · in Torque Game Engine · 02/21/2008 (9:43 pm) · 3 replies

I can't seem to figure out why it does this, but when the logo::OnCollision is called and I try to commandToClient(%client,"SetScoreCounter",%client.score); it gives me this error:
Remote Command Error - command must be a tag.

I can't figure out how to fix it, any suggestions?

#1
02/22/2008 (7:03 am)
You need to use 'SetScoreCounter' instead of quotes.
#2
02/22/2008 (7:22 am)
Steve is correct, single quotes and double quotes mean two different things in TorqueScript:

--double quotes enclose a string of characters that is constant, but not indexed
--single quotes enclose a string of characters that is both constant, and indexed, called a tagged string.

The engine wants this differentiation because it is able to optimize the networking of a tagged string through by placing the string into a table, and then whenever it next needs to deliver that string to a particular client or server, it instead sends the index of the string, saving bandwidth.
#3
02/23/2008 (8:13 pm)
Thanks, that was exactly the problem