Little strtok problem on /report command
#1

Well, yesterday I started making mAdmin (MeanAdmin) and I have done 1k lines already, but I got a little problem with my /report command:
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: %d", playerid, reporter, id, reported, reason);
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(PInfo[i][Level] >= 1)
        {
            SendClientMessage(i, LIGHTBLUE, string);
        }
    }
    return 1;
}
And my reason says: reason: 0
Asking for help
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)