sscanf2 issue
#7

Your problem is that you use GetPlayerName on ID before you find out what ID is.
That means when you use "GetPlayerName(ID,aName,sizeof(aName));" ID is still new, uninitialised, aka 0.
So the name will always be the name of player 0.

pawn Код:
dcmd_wank(playerid,params[])
{
    new ID; <-- ID is empty which means 0
    ...
    GetPlayerName(ID,aName,sizeof(aName)); <-- ID is still 0
    ...
    if(sscanf(params,"u",ID)) <-- This is where you find out what ID is
    {
        ...
    }
    ...
    return 1;
}
Reply


Messages In This Thread
sscanf2 issue - by willsuckformoney - 07.11.2010, 02:20
Re: sscanf2 issue - by GaGlets(R) - 07.11.2010, 02:40
Re: sscanf2 issue - by willsuckformoney - 07.11.2010, 02:43
Re: sscanf2 issue - by GaGlets(R) - 07.11.2010, 03:05
Re: sscanf2 issue - by willsuckformoney - 07.11.2010, 03:15
Re: sscanf2 issue - by GaGlets(R) - 07.11.2010, 03:19
Re: sscanf2 issue - by Nomine - 08.11.2010, 13:10
Re: sscanf2 issue - by GaGlets(R) - 08.11.2010, 23:32
Re: sscanf2 issue - by willsuckformoney - 08.11.2010, 23:40
Re: sscanf2 issue - by GaGlets(R) - 08.11.2010, 23:54

Forum Jump:


Users browsing this thread: 1 Guest(s)