[HELP] File Path
#5

Quote:
Originally Posted by 0rb
You have to assign something to %s. Do you think Pawn is smart enough to guess that your %s should be a player name?

pawn Код:
new str[18 + MAX_PLAYER_NAME];
GetPlayerName(playerid, str, MAX_PLAYER_NAME);
format(str, sizeof str, "xadmin/Users/%s.ini", str);

if(dini_Exists(str))
But this will silently crash your server if a player have a name containing forbidden files characters.
Why do you do:

pawn Код:
new str[18 + MAX_PLAYER_NAME];
24 (MAX_PLAYER_NAME) + 18 = 42 but a player's name can only be max 24 characters..

Reply


Messages In This Thread
[HELP] File Path - by Haegon - 06.07.2009, 01:09
Re: [HELP] File Path - by Correlli - 06.07.2009, 01:12
Re: [HELP] File Path - by Haegon - 06.07.2009, 03:27
Re: [HELP] File Path - by yom - 06.07.2009, 04:56
Re: [HELP] File Path - by -Sneaky- - 06.07.2009, 05:53
Re: [HELP] File Path - by Haegon - 06.07.2009, 06:17
Re: [HELP] File Path - by yom - 06.07.2009, 06:36
Re: [HELP] File Path - by -Sneaky- - 06.07.2009, 07:59
Re: [HELP] File Path - by dice7 - 06.07.2009, 08:28
Re: [HELP] File Path - by Haegon - 07.07.2009, 01:15

Forum Jump:


Users browsing this thread: 2 Guest(s)