a little question
#1

heya , i have a question lets say i have variable lol

example

new lol;

lol = "alalalalala";


i want to get the number of characters inside the variable
in this case the output would be 11. Please help me.

I need to check when a user does /changename if the name he types is less then 20 characters of lenght.

thanks.
Reply
#2

len(x)?
Reply
#3

Use this:

pawn Код:
if(strlen(nameofvariable) < 1 || strlen(nameofvariable) > 24) return SendClientMessage(playerid, color, "Type your message to send here if he put less than 1 character or more than 24, which is the max_player_name");
It'll check if the length of the string, i.e. stringlength is between 1 and 24, if not, then it will return that message.
Reply
#4

dude thanks. <3
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)