Scripting/Server/Functions/GetTok
Returns token n (1-based) of the string split by separator, or tokens n to m joined by the separator. Returns null if n is out of range.
Syntax
GetTok(string, separator, n [, m])Arguments
- string value
- any separator – Returns token
n(1-based) of the string split byseparator, or tokensntomjoined by the separator. - any n – Returns token
n(1-based) of the string split byseparator, or tokensntomjoined by the separator. - any m (optional) – Returns token
n(1-based) of the string split byseparator, or tokensntomjoined by the separator.
Example
function onPlayerCommand( player, cmd, params )
{
if ( cmd == "gettok" )
{
GetTok( true, 0, 0 );
}
}This sample was generated from the signature – adapt the values to your gamemode.
Related pages
Section: Maths and strings
Categories: Server functions | Maths and strings