Little strtok problem on /report command
#4

pawn Код:
dcmd_report(playerid, params[])
{
    new tmp[256];
    new tmp2[256];
    new Index;
    tmp = strtok(params, Index);
    tmp2 = strtok(params, Index);
    new id = strval(tmp);
    new reason = strval(tmp2);
    new string[128];
    new reporter[MAX_PLAYER_NAME], reported[MAX_PLAYER_NAME];
    GetPlayerName(playerid, reporter, MAX_PLAYER_NAME);
    GetPlayerName(id, reported, MAX_PLAYER_NAME);
    format(string, 128, "[REPORT] [%d]%s reported [%d]%s || reason: %s", playerid, reporter, id, reported, reason);
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(PInfo[i][Level] >= 1)
        {
            SendClientMessage(i, LIGHTBLUE, string);
        }
    }
    return 1;
}
pawn Код:
reason: %s
You had it as an integer "%d" should be "%s"
Reply


Messages In This Thread
Little strtok problem on /report command - by Mean - 06.01.2011, 15:13
Re: Little strtok problem on /report command - by Kyle - 06.01.2011, 15:24
Re: Little strtok problem on /report command - by Mean - 06.01.2011, 15:26
Re: Little strtok problem on /report command - by Kaylux - 06.01.2011, 15:32
Re: Little strtok problem on /report command - by Mean - 06.01.2011, 15:35
Re: Little strtok problem on /report command - by bartje01 - 06.01.2011, 15:38
Re: Little strtok problem on /report command - by Mean - 06.01.2011, 15:42
Re: Little strtok problem on /report command - by Ash. - 06.01.2011, 15:44
Re: Little strtok problem on /report command - by bartje01 - 06.01.2011, 15:57
Re: Little strtok problem on /report command - by Kaylux - 06.01.2011, 17:17

Forum Jump:


Users browsing this thread: 1 Guest(s)