Game Development Community

strToPlayerName

by Ron Yacketta · in Torque Game Engine · 05/09/2002 (11:54 am) · 1 replies

Folks,

in the ConsoleFunction strToPlayerName their is a nice little if check to skip over certain characters in players names (in short, disallow those characters).

Would it not be a wise idea to add "%" and "$" to this list? seeing that "%" and "$" are reserved tokens for scripting?

I know that other games had issues with cheats etc when players used reserver tokens in their names.

change:
if ( ch < 32 || ch == ',' || ch == '.' || ch == '\'' || ch == ''' )

to:
if ( ch < 32 || ch == ',' || ch == '.' || ch == '\'' || ch == ''' || ch == '%' || ch == '$' )

Regards,
Ron

#1
05/10/2002 (11:05 am)
It shouldn't matter unless people are doing things like "exec($playerName);", which seems unlikely. It could be a potential problem though, I guess.

Josh