Converting Nicks to lower case upon register/login
#7

tolower takes a character as a parameter, not a string. You need to loop through the string and use tolower() on every individual character.

EDIT: StreetGT beat me. I'd suggest some minor changes though:

pawn Код:
public NickToLower(const nick[])
{
    for(new i=0, j=strlen(nick); i<j; i++)
    {
        nick[i] = tolower(nick[i]);
    }
    return nick;
}
Reply


Messages In This Thread
Converting Nicks to lower case upon register/login - by Anak - 24.07.2013, 09:46
Re: Converting Nicks to lower case upon register/login - by MP2 - 24.07.2013, 09:48
Re: Converting Nicks to lower case upon register/login - by Anak - 24.07.2013, 10:19
Re: Converting Nicks to lower case upon register/login - by Donvalley - 24.07.2013, 10:50
Re: Converting Nicks to lower case upon register/login - by Anak - 24.07.2013, 11:18
Re: Converting Nicks to lower case upon register/login - by StreetGT - 24.07.2013, 11:27
Re: Converting Nicks to lower case upon register/login - by MP2 - 24.07.2013, 11:32

Forum Jump:


Users browsing this thread: 1 Guest(s)