tolower from Y_LESS is buggy?
#1

Source: http://forum.sa-mp.com/showpost.php?...17&postcount=7
pawn Code:
#define tolower(%0) \
    (((%0) >= 'A' && (%0) <= 'Z') ? ((%0) | 0x20) : (%0))
I use this.
pawn Code:
new option[30];
format(option, sizeof option, "TeSt");"
format(option, sizeof option, tolower(option));
And i get this Error.
Code:
error 033: array must be indexed (variable "option")
(in "tolower" string)
Reply
#2

It changes(tolowers) only one char, not whole string.

if you want whole string
pawn Code:
for(new i=0;option[i];i++)
option[i]=tolower(option[i]);
Reply
#3

Year, i see.
Iґm tired -.-
I should go sleep, xD

pawn Code:
for(new x = 0; x < strlen(option); x++)
    option[x] = tolower(option[x]);
omg -.-

can closed ...

But thank you!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)