Removing '_' from name
#8

You gotta use a variable. If you want direct input to work then your function would be:
pawn Код:
NameSpace(const name[])
{
    new player_name[MAX_PLAYER_NAME + 1];
    strcat(player_name, name, sizeof(player_name));

    for(new i = 0, j = strlen(player_name); i < j; i ++)
    {
        player_name[i] == '_' && (player_name[i] = ' ');
    }
    return player_name;
}
Reply


Messages In This Thread
Removing '_' from name - by javad - 16.06.2017, 20:13
Re: Removing '_' from name - by Toroi - 16.06.2017, 20:18
Re: Removing '_' from name - by javad - 16.06.2017, 20:25
Re: Removing '_' from name - by CheezIt - 16.06.2017, 21:04
Re: Removing '_' from name - by javad - 16.06.2017, 21:19
Re: Removing '_' from name - by CheezIt - 16.06.2017, 21:23
Re: Removing '_' from name - by javad - 16.06.2017, 21:40
Re: Removing '_' from name - by CheezIt - 17.06.2017, 01:34
Re: Removing '_' from name - by SyS - 17.06.2017, 06:00
Re: Removing '_' from name - by jlalt - 17.06.2017, 07:00

Forum Jump:


Users browsing this thread: 1 Guest(s)