Sscanf doing weird
#3

Quote:
Originally Posted by ryansheilds
Посмотреть сообщение
Seems to be a sscanf issue - The code looks fine, try downloading the latest include then put it in the PAWN include folder & recompile the script. https://sampforum.blast.hk/showthread.php?tid=120356
Are you serious?


pawn Код:
format(Msg, sizeof(Msg), "%s has kicked %s due to %s", GetPlayerName(playerid, Name, sizeof(name), GetPlayerName(kicktarget, Namee, sizeof(Namee)), reason);
you problem lies in that code,GetPlayerName puts the players name in the string you assign, it does not return the players name so you can not just do what you've done there.

You need to do something like...

pawn Код:
new Name[MAX_PLAYER_NAME], Msg[128];
GetPlayerName(playerid, Name, sizeof(Name));
format(Msg, sizeof(Msg), "%s has blah blah", Name);
Reply


Messages In This Thread
Sscanf doing weird - by SomebodyAndMe - 28.10.2012, 17:56
Re: Sscanf doing weird - by ryansheilds - 28.10.2012, 18:52
Re: Sscanf doing weird - by PrawkC - 28.10.2012, 18:56
Re: Sscanf doing weird - by ryansheilds - 28.10.2012, 19:11
Re: Sscanf doing weird - by PrawkC - 28.10.2012, 19:28

Forum Jump:


Users browsing this thread: 1 Guest(s)