strcmp to zcmd failure, undefined symbol
#1

So I just converted all my strcmp commands to zcmd but I'm having some problems, everytime I try to compile it says:

Код:
error 029: invalid expression, assumed zero
error 017: undefined symbol "cmd_day"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Top of my script
Код:
#include <zcmd>
The command:
Код:
public OnPlayerSpawn(playerid)
{
CMD:day(playerid, params[])
{
	SetPlayerTime(playerid,12,0);
	SendClientMessage(playerid, yellow, "Its Day For You.");
	return 1;
}
I think it shouldn't be under OnPlayerSpawn but it gives errors no matter where I put it
Reply
#2

Actually, zcmd commands are like functions. You define them like this:
Код:
public OnPlayerSpawn(playerid)
{
   //code when player SPAWNS
   return 1;
}

CMD:day(playerid, params[]) //Your command
{
	SetPlayerTime(playerid, 12, 0);
	SendClientMessage(playerid, yellow, "Its Day For You.");
	return 1;
}
Reply
#3

I just did that and it's still the same error

Код:
error 017: undefined symbol "cmd_day"
Reply
#4

Try this under your defines:


pawn Код:
#define cmd_day
Reply
#5

Quote:
Originally Posted by Weaselpwns
Посмотреть сообщение
Try this under your defines:


pawn Код:
#define cmd_day
The compiler crashed after I did that
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)