Unkown cmd error
#1

My code:
Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success) SendClientMessage(playerid, -1, "{FF0000}[ERROR]:{FF8000} Invaild command");
    return 1;
}
Error:
Код:
E:\RP\gamemodes\ndrp.pwn(44679) : warning 235: public function lacks forward declaration (symbol "OnPlayerCommandPerformed")
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

1 Warning.
Reply
#2

Have you included zcmd/y_commands ?
Reply
#3

Add this to your script.

pawn Код:
forward OnPlayerCommandPerformed(playerid, cmdtext[], success);
Reply
#4

Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success)  return  SendClientMessage(playerid, -1, "{FF0000}[ERROR]:{FF8000} Invaild command");
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: