You do realize that get_maxplayers returns the settings value and not the amount of connected players currently at the server, search for proper method. Strings don't have operators, so you could use some kind of native for example format to build the string. You are setting the string's value totally wrong, read some pawn tutorial for arrays and their indexes and please don't create variables inside loops. Why would you create such function as public?