TorqueScript Reference
Functions

Functions

String addTaggedString (string)
 
String buildTaggedString (format,[arg1,...arg9]?)
 
void commandToClient (client, func,[arg1,..., argn]?)
 
void commandToServer (func,[arg1,..., argn]?)
 
String getTaggedString (tag)
 
void removeTaggedString (tag)
 

Detailed Description

Function Documentation

String addTaggedString ( string  )

Use the addTaggedString function to tag a new string and add it to the NetStringTable.

Parameters
stringThe string to tagged and placed in the NetStringTable. Tagging ignores case, so tagging the same string (excluding case differences) will be ignored as a duplicated tag.
Returns
Returns a string (containing a numeric value) equivalent to the string ID for the newly tagged string
String buildTaggedString ( format  ,
[arg1, ...arg9] ?   
)

Use the buildTaggedString function to build a tagged string using the specified format.

Parameters
enableA boolean value. If set to true, network packet logging is enabled, otherwise it is disabled.
Returns
No return value
void commandToClient ( client  ,
func  ,
[arg1, ... , argn] ?   
)

Use the commandToClient function to issue a remote procedure call on a client. All arguments (excluding client) may be in tagged or non-tagged format. See 'Remote Procedure Call Samples' below

Parameters
clientThe numeric ID of a client gameConnection.
funcThe suffix of the remote procedure name to be executed on the client.
arg1... argn - Optional arguments to be passed to the remote procedure.
Returns
No return value.
void commandToServer ( func  ,
[arg1, ... , argn] ?   
)

Use the commandToServer function to issue a remote procedure call the server. All arguments may be in tagged or non-tagged format. See 'Remote Procedure Call Samples' below

Parameters
funcThe suffix of the remote procedure name to be executed on the client.
arg1... argn - Optional arguments to be passed to the remote procedure.
Returns
No return value.
String getTaggedString ( tag  )

Use the getTaggedString function to convert a tag to a string. This is not the same a detag() which can only be used within the context of a function that receives a tag. This function can be used any time and anywhere to convert a tag to a string.

Parameters
tagA numeric tag ID.
Returns
Returns the string corresponding to the tag ID
void removeTaggedString ( tag  )

Use the removeTaggedSTring function to remove a previously tagged string from the NetStringTable.

Parameters
tagA number tag ID.
Returns
No return value