27.09.2013, 20:48
Greetings,
Today I was making a /v command for administrators, but when I complie it I get this errors:
Andthis is my code:
If anyone can help me.
Regards,
Pablo.
Today I was making a /v command for administrators, but when I complie it I get this errors:
pawn Код:
C:\Users\usuario\Sa-Mp\filterscripts\sql&cmd.pwn(1097) : error 029: invalid expression, assumed zero
C:\Users\usuario\Sa-Mp\filterscripts\sql&cmd.pwn(1097) : error 001: expected token: ";", but found "if"
pawn Код:
new vCar[MAX_PLAYERS];
CMD:v(playerid, params[])
{
if(gPlayerInfo[playerid][pAdmin] >= 1)
{
new vid;
if(sscanf(params, "i", vid)) return SendClientMessage(playerid, -1, "{878787}USAGE: /v [id(400 - 611)]");
{
else if (vid < 400 || vid > 611) return SendClientMessage(playerid, -1, "{FF0000}ERROR: Invalid veichle id"); //THIS LINE
else
{
if(vCar[playerid] != -1)
{
DestroyVehicle(vCar[playerid]);
}
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
vCar[playerid] = CreateVehicle(vid, x + 3, y, z, 0, 0,0, -1);
SendClientMessage(playerid, COL_ORANGE, "SERVER: The server has spawned a car for you");
}
}
}
return 1;
}
Regards,
Pablo.