Problem with command
#6

Did you put this code under any public functions??
NOTE: Commands when using ZCMD shouldn't be placed under any public functions, but in their own external space.
Example of a WRONG COMMAND PLACEMENT
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    CMD:quitjob(playerid, params[])
    {
        return 1;
    }
    return 1;
}

public OnPlayerSpawn(playerid)
{
    return 1;
}
Example of a CORRECT COMMAND PLACEMENT:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    return 1;
}

CMD:quitjob(playerid, params[])
{
    return 1;
}

public OnPlayerSpawn(playerid)
{
    return 1;
}
Look at how the Command is not actually residing inside any public function. It does not have to be between them, it can be placed anywhere as long as all definitions and includes have been defined before its use.
Reply


Messages In This Thread
Problem with command - by UnknownGamer - 17.09.2012, 23:37
AW: Problem with command - by arvifilter - 18.09.2012, 00:06
Re: Problem with command - by antonio112 - 18.09.2012, 00:35
Re: Problem with command - by trapstar2020 - 18.09.2012, 03:14
Re: Problem with command - by UnknownGamer - 18.09.2012, 10:18
Re: Problem with command - by clarencecuzz - 18.09.2012, 10:23
Re: Problem with command - by Devilxz97 - 18.09.2012, 10:28

Forum Jump:


Users browsing this thread: 1 Guest(s)