error 017: undefined symbol "cmd"
#3

This looks like something from the Godfather. Switch over to a command processor such as ZCMD or YCMD.

pawn Код:
if(strcmp(cmd, "/report", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            GetPlayerName(playerid, sendername, sizeof(sendername));
            new length = strlen(cmdtext);
            while ((idx < length) && (cmdtext[idx] <= ' '))
            {
                idx++;
            }
            new offset = idx;
            new result[64];
            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
            {
                result[idx - offset] = cmdtext[idx];
                idx++;
            }
            result[idx - offset] = EOS;
            if(!strlen(result))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /report [reason]");
                return 1;
            }
            format(string, sizeof(string), "Report %s: %s", sendername, (result));
            ABroadCast(COLOR_YELLOW,string,1);
            SendClientMessage(playerid, COLOR_YELLOW, "Your report message has been sent to the Admins!");
        }
        return 1;
    }
As quoted from the godfather...
Reply


Messages In This Thread
error 017: undefined symbol "cmd" - by phil_lendon - 12.07.2011, 19:38
Re: error 017: undefined symbol "cmd" - by Roko_foko - 12.07.2011, 20:34
Re: error 017: undefined symbol "cmd" - by Kush - 12.07.2011, 20:47
Re: error 017: undefined symbol "cmd" - by Shadoww5 - 12.07.2011, 21:55

Forum Jump:


Users browsing this thread: 1 Guest(s)