Complile Error? - ZCMD - +REP!
#1

So I'm using ZCMD and here is what I'm stuck on. Here's my code:

Код:
COMMAND:cmds(playerid, params[])
{
   SendClientMessage(playerid,R,"_------Game /cmds----_");
   SendClientMessage(playerid,G,"/rules (server rules) /kill (suicide) /admins (admins online) /snack (eat snack for health)");
   SendClientMessage(playerid,G,"/report (report bugs or cheaters) /hits (people to kill for money) /hit (to place a hit on someone)");
   SendClientMessage(playerid,G,"/event (join event) /pm (private message) /moneybag (Money Bag location)");
   SendClientMessage(playerid,G,"-----Group Commands-----");
   SendClientMessage(playerid,G,"/grc [name] (create a group)");
   SendClientMessage(playerid,G,"/gri [id] (invite people to your group)");
   SendClientMessage(playerid,G,"/grl (leaves your current group)");
   SendClientMessage(playerid,R,"-------//Commands List End-------");
   return 1;
}
I want it so when a user types in /cmds it will SendClientMessage. But when I compile it, it gives me errors. Here are the errors:

Код:
error 029: invalid expression, assumed zero
error 017: undefined symbol "cmd_cmds"
error 029: invalid expression, assumed zero
What I am doing wrong? +REP!
Reply
#2

Do you have
pawn Код:
#include <zcmd>
On top of your script?
Reply
#3

do you have R and G defined in your code somewhere??

pawn Код:
#define R 0xFF0000FF
#define G 0x0000FFFF
Reply
#4

@WooTFTW - Yes I do.
@Jonny5 - I have that up top as well with all the other colors.
Reply
#5

There's nothing wrong with the command, you're not giving us enough information.
You have the command placed in a callback or outside?
Reply
#6

I put it under OnPlayerCommandText
Reply
#7

You have to play it out of a callback.
Reply
#8

Quote:
Originally Posted by 2KY
Посмотреть сообщение
You have to play it out of a callback.
Works! Thanks so much! +rep'd you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)