Quote:
Originally Posted by xVIP3Rx
With your code, it gives me spaces instead of litters
test code:
pawn Код:
public OnPlayerText(playerid, text[]) { SendClientMessage(playerid, -1, strlower(text)); return 0; } stock strlower(string[]) { for(new i; i<strlen(string); i++) string[i] = tolower(string[i]);
return string; }
Those work, tested, one returns the string and one doesn't.
pawn Код:
#define strlower(%1) for(new i; i<strlen(%1); i++) %1[i] = tolower(%1[i])
public OnPlayerText(playerid, text[]) { strlower(text); return 1; }
pawn Код:
public OnPlayerText(playerid, text[]) { SendClientMessage(playerid, -1, strlower(text)); return 0; } stock strlower(string[]) { new tempstring[MAX_PLAYER_NAME];
for(new i; i<strlen(string); i++) tempstring[i] = tolower(string[i]);
return tempstring; }
|
Third code worked
Thank you very very much, bro
You are the best
rep++;