[Help] Strange Problem with Sscanf
#4

Quote:
Originally Posted by [TMS]Legena
Посмотреть сообщение
Код:
new targetid;
new Playername[MAX_PLAYER_NAME];
GetPlayerName(targetid, Playername, sizeof(Playername));
if(sscanf(params,"us[64]",targetid,reason)) return SCM(playerid, 0xFF0000,"Use: {FFFFFF}/ban [ID/Nick] [Reason]"
);

Maybe will this work?
No, it will not. Your code will always get the name of the player with ID 0. sscanf line is supposed to be first so the ID from the parameters can be assigned on targetid.
Reply


Messages In This Thread
[Help] Strange Problem with Sscanf - by David (Sabljak) - 10.01.2014, 18:45
Re: [Help] Strange Problem with Sscanf - by Luca12 - 10.01.2014, 19:21
Re: [Help] Strange Problem with Sscanf - by [TMS]Legena - 10.01.2014, 21:10
Re: [Help] Strange Problem with Sscanf - by Konstantinos - 10.01.2014, 21:17
Re: [Help] Strange Problem with Sscanf - by David (Sabljak) - 10.01.2014, 22:21

Forum Jump:


Users browsing this thread: 1 Guest(s)