Help with forbidden characters [+1]
#7

Oy, I have another few things to say here...

1) Your command does not require sscanf parsing. It has one parameter only!
pawn Код:
CMD:changeemail(playerid, params[])
{
    if(isnull(params))
    {
        // Output the message about how the usage of the command really is!
    }

    // ...
    return true;
}
2) Your "var" array is a bit too small to contain larger e-mail addresses as their size, by rfcs, is allowed to up to 64 characters I believe.
pawn Код:
new var[64+1];
3) You don't actually need multiple arrays to store these strings, you don't use any of them at the same time. So don't waste memory! And don't get the same player's name TWICE.
pawn Код:
new string[128], playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));
format(string, sizeof(string), "users/%s.ini", playername);
// new hFile = ...;
Reply


Messages In This Thread
Help with forbidden characters [+1] - by CaRa - 10.10.2012, 19:21
Re: Help with forbidden characters [+1] - by PrawkC - 10.10.2012, 19:29
Re: Help with forbidden characters [+1] - by CaRa - 10.10.2012, 19:31
Re: Help with forbidden characters [+1] - by PrawkC - 10.10.2012, 19:35
Re: Help with forbidden characters [+1] - by AndreT - 10.10.2012, 19:36
Re: Help with forbidden characters [+1] - by CaRa - 10.10.2012, 19:47
Re: Help with forbidden characters [+1] - by AndreT - 10.10.2012, 19:56
Re: Help with forbidden characters [+1] - by CaRa - 10.10.2012, 20:12

Forum Jump:


Users browsing this thread: 2 Guest(s)