Posts: 93
Threads: 13
Joined: Sep 2011
Reputation:
0
I made this command at line 184 CMD:me(playerid, params[]) at Onplaycommandtext.
I have ZCMD Include
Errors are:
z:\Program Files\\gamemodes\aaaaa.pwn(184) : error 029: invalid expression, assumed zero
z:\Program Files\\gamemodes\aaaaa.pwn(184) : error 017: undefined symbol "cmd_me"
z:\Program Files\\gamemodes\aaaaa.pwn(184) : error 029: invalid expression, assumed zero
z:\Program Files\\gamemodes\aaaaa.pwn(184) : fatal error 107: too many error messages on one line
Posts: 1,923
Threads: 46
Joined: Aug 2012
Reputation:
0
I don't know ZCMD, but I know that it must not be placed under any callback.
Posts: 747
Threads: 143
Joined: Jul 2010
Reputation:
0
Have you included ZCMD at the top of your script?
Posts: 852
Threads: 26
Joined: Jul 2011
Reputation:
0
You cannot use ZCMD with OnPlayerCommandText. Just remove OnPlayerCommandText and place your ZCMD command.
Posts: 93
Threads: 13
Joined: Sep 2011
Reputation:
0
Thanks Mr Anonymous! Now I am getting wayyyy more errors
S:\Program Files\SG-RP Custom\gamemodes\SG-RP.pwn(225) : error 001: expected token: "(", but found "-identifier-"
S:\Program Files\SG-RP Custom\gamemodes\SG-RP.pwn(225) : error 001: expected token: ";", but found "("
S:\Program Files\SG-RP Custom\gamemodes\SG-RP.pwn(228) : error 054: unmatched closing brace ("}")
S:\Program Files\SG-RP Custom\gamemodes\SG-RP.pwn(229) : error 001: expected token: "(", but found "-identifier-"
S:\Program Files\SG-RP Custom\gamemodes\SG-RP.pwn(229) : error 001: expected token: ";", but found "("
S:\Program Files\SG-RP Custom\gamemodes\SG-RP.pwn(232) : error 021: symbol already defined: "SendClientMessage"
S:\Program Files\SG-RP Custom\gamemodes\SG-RP.pwn(233) : error 010: invalid function or declaration
S:\Program Files\SG-RP Custom\gamemodes\SG-RP.pwn(235) : error 001: expected token: "(", but found "-identifier-"
S:\Program Files\SG-RP Custom\gamemodes\SG-RP.pwn(235) : error 001: expected token: ";", but found "("
S:\Program Files\SG-RP Custom\gamemodes\SG-RP.pwn(238) : error 021: symbol already defined: "SendClientMessage"
S:\Program Files\SG-RP Custom\gamemodes\SG-RP.pwn(239) : error 010: invalid function or declaration
S:\Program Files\SG-RP Custom\gamemodes\SG-RP.pwn(241) : error 001: expected token: "(", but found "-identifier-"
S:\Program Files\SG-RP Custom\gamemodes\SG-RP.pwn(241) : error 001: expected token: ";", but found "("
S:\Program Files\SG-RP Custom\gamemodes\SG-RP.pwn(244) : error 021: symbol already defined: "SendClientMessage"
S:\Program Files\SG-RP Custom\gamemodes\SG-RP.pwn(245) : error 010: invalid function or declaration
Here are lines 225 to 245
CMD:car engine(playerid,params[])
{
}
CMD:car bonnet(playerid,params[])
{
SendClientMessage(playerid, COLOR_GREEN, "Vehicle bonnet opened");
return 1;
}
CMD:car trunk(playerid,params[])
{
SendClientMessage(playerid, COLOR_GREEN, "Vehicle trunk opened");
return 1;
}
CMD:car lights(playerid,params[])
{
SendClientMessage(playerid, COLOR_GREEN, "Vehicle lights enabled");
return 1;
}
Posts: 852
Threads: 26
Joined: Jul 2011
Reputation:
0
As far as I know, there cannot be any space between commands. Also, check for an additional return after all ZCMD commands. And do you have the ZCMD include with sscanf?
Posts: 93
Threads: 13
Joined: Sep 2011
Reputation:
0
I only have ZCMD not sscanf. It worked though, I removed all spaces between commands and NO ERRORS. But I want spaces. How can I add spaces
Posts: 852
Threads: 26
Joined: Jul 2011
Reputation:
0
I don't think you can add spaces in commands. But however, you can add spaces inside the command. Maybe like /engine <on/off>.