Strlen
#5

adminctext holds the max 130 characters stored by sscanf so the check would fail. You don't need a new string and sscanf for that though:
pawn Код:
if (isnull(params)) return SendClientMessage(playerid, COLOR_CYAN, "USAGE: /a <text>");
if (strlen(params) > 130) return SendClientMessage(playerid, COLOR_RED, "error: long text!");
...
// "params" holds the text
Reply


Messages In This Thread
Strlen - by TiXz0r - 10.05.2015, 14:08
Re: Strlen - by justice96 - 10.05.2015, 14:12
Re: Strlen - by TiXz0r - 10.05.2015, 14:19
Re: Strlen - by Stev - 10.05.2015, 14:21
Re: Strlen - by Konstantinos - 10.05.2015, 14:22

Forum Jump:


Users browsing this thread: 3 Guest(s)