Help with "INI_WriteInt"
#5

Quote:
Originally Posted by Troydere
Посмотреть сообщение
Maybe you should get the player name before formatting the path.

your PATH define should be something like "users/%s.ini" , then you're trying to insert an integer in that %s, which is not going to happen.

Get the player's name before formatting:

Код:
new playname[24];
GetPlayerName(name,playname,sizeof playname);
format(file, 100, PATH, playname);
EDIT: Unless you want to use that command with offline players aswell, if that's the case, make name a string
Код:
Name[24];
and replace the 'u' for the string in sscanf.

Код:
if(sscanf(params, "s[24]s[50]", Name, reason)) return SendClientMessage(playerid, error, "Usage: /obanacc <Player Name> <Reason>");
And leave everything else as it is
Thank you VERY much. rep+
Reply


Messages In This Thread
Help with "INI_WriteInt" - by 1fret - 05.03.2017, 22:52
Re: Help with "INI_WriteInt" - by Toroi - 05.03.2017, 23:20
Re: Help with "INI_WriteInt" - by 1fret - 06.03.2017, 01:31
Re: Help with "INI_WriteInt" - by Toroi - 06.03.2017, 01:35
Re: Help with "INI_WriteInt" - by 1fret - 06.03.2017, 01:59

Forum Jump:


Users browsing this thread: 2 Guest(s)