SSCANF 2 Command Issue
#3

Quote:
Originally Posted by bigcomfycouch
Посмотреть сообщение
You had message, which should've been a string, as an interger. You also needn't use sscanf for a single parameter.

pawn Код:
#define isnull(%1)                        (!%1[0] || (%1[0] == '\1' && !%1[1]))

command(say, playerid, params[])
{
    new
        string[128];
    if(PlayerStatistics[playerid][pAdminLevel] < 3) return 1;
    if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "SYNTAX: /say [message]");
    if(!IsPlayerConnectedEx(playerid)) return SendClientMessage(playerid, COLOR_WHITE, "You are not logged in!");
    format(string, sizeof(string), "* Admin: %s", message);
    SendClientMessageToAll(0x2587CEFF, string);
    return 1;
}
Doesn't SSCANF already check if the parameter is null?
Reply


Messages In This Thread
SSCANF 2 Command Issue - by Scenario - 28.09.2010, 23:53
Re: SSCANF 2 Command Issue - by bigcomfycouch - 29.09.2010, 00:03
Re: SSCANF 2 Command Issue - by Scenario - 29.09.2010, 00:11
Re: SSCANF 2 Command Issue - by bigcomfycouch - 29.09.2010, 00:12
Re: SSCANF 2 Command Issue - by Scenario - 29.09.2010, 00:19
Re: SSCANF 2 Command Issue - by [L3th4l] - 29.09.2010, 00:23
Re: SSCANF 2 Command Issue - by Scenario - 29.09.2010, 00:26
Re: SSCANF 2 Command Issue - by [L3th4l] - 29.09.2010, 00:33
Re: SSCANF 2 Command Issue - by Grim_ - 29.09.2010, 00:34
Re: SSCANF 2 Command Issue - by Scenario - 29.09.2010, 00:39

Forum Jump:


Users browsing this thread: 3 Guest(s)