Complile Error? - ZCMD - +REP! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Complile Error? - ZCMD - +REP! (
/showthread.php?tid=330606)
Complile Error? - ZCMD - +REP! -
TheMightyEddy - 01.04.2012
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!
Re: Complile Error? - ZCMD - +REP! -
WooTFTW - 01.04.2012
Do you have
On top of your script?
Re: Complile Error? - ZCMD - +REP! -
Jonny5 - 01.04.2012
do you have R and G defined in your code somewhere??
pawn Код:
#define R 0xFF0000FF
#define G 0x0000FFFF
Re: Complile Error? - ZCMD - +REP! -
TheMightyEddy - 01.04.2012
@WooTFTW - Yes I do.
@Jonny5 - I have that up top as well with all the other colors.
Re: Complile Error? - ZCMD - +REP! -
WooTFTW - 01.04.2012
There's nothing wrong with the command, you're not giving us enough information.
You have the command placed in a callback or outside?
Re: Complile Error? - ZCMD - +REP! -
TheMightyEddy - 01.04.2012
I put it under OnPlayerCommandText
Re: Complile Error? - ZCMD - +REP! -
2KY - 01.04.2012
You have to play it out of a callback.
Re: Complile Error? - ZCMD - +REP! -
TheMightyEddy - 01.04.2012
Quote:
Originally Posted by 2KY
You have to play it out of a callback.
|
Works! Thanks so much! +rep'd you.