Error. -
Hello guys. Please help. I use ZCMD.
PHP код:
C:\Users\1\Desktop\Sanchez Server\gamemodes\gamemode.pwn(220) : error 029: invalid expression, assumed zero
C:\Users\1\Desktop\Sanchez Server\gamemodes\gamemode.pwn(220) : error 017: undefined symbol "cmd_giveveh"
C:\Users\1\Desktop\Sanchez Server\gamemodes\gamemode.pwn(220) : error 029: invalid expression, assumed zero
C:\Users\1\Desktop\Sanchez Server\gamemodes\gamemode.pwn(220) : fatal error 107: too many error messages on one line
Re: Error. - iLearner - 02.01.2017
Re: Error. -
PHP код:
CMD:giveveh(playerid, params[])
{
new
targetid,
modelid,
color_1,
color_2;
if(sscanf(params, "uiI(-1)I(-1)", targetid, modelid, color_1, color_2))
return SendClientMessage(playerid, -1, "???????????: /giveveh [targetid] [modelid] {color_1} {color_2}");
if(0 == IsPlayerConnected(targetid))
return SendClientMessage(playerid, -1, "?????? ?????? ??? ?? ???????.");
if(!(400 <= modelid <= 611))
return SendClientMessage(playerid, -1, "?????? ?????????? ?? ??????????.");
new
Float: p_pos_x,
Float: p_pos_y,
Float: p_pos_z,
Float: p_pos_a;
GetPlayerPos(targetid, p_pos_x, p_pos_y, p_pos_z);
GetPlayerFacingAngle(targetid, p_pos_a);
PutPlayerInVehicle(targetid, CreateVehicle(modelid, p_pos_x, p_pos_y, p_pos_z, p_pos_a, color_1, color_2, -1), 0);
static const
fmt_str[] = "?? ?????? ?????? %s (%i) ???????????? ????????. ID ??????: %i.";
new
str[sizeof(fmt_str) + (-2 + MAX_PLAYER_NAME) + (-2 + 3) + (-2 + 3)];
GetPlayerName(targetid, str, MAX_PLAYER_NAME + 1);
format(str, sizeof(str), fmt_str, str, targetid, modelid);
return SendClientMessage(playerid, 0xFF0000FF, str);
}
Re: Error. -
Re: Error. -
the command should be placed as global not as local to any callback or function.
Re: Error. -
1. Make sure zcmd is included #include <zcmd>
2. Make sure that the command is not located in any public function.