11.04.2012, 07:54
I got errors i got confused on it
here is the error
here is the error
Код:
C:\Users\Daniel\SanAndreas Muliplayer\server\gamemodes\ricaniel.pwn(739) : error 032: array index out of bounds (variable "randomEngine") Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
pawn Код:
CMD:engine(playerid)
{
new vid = GetPlayerVehicleID(playerid);
new randomEngine[][1] =
{
{VEHICLE_PARAMS_OFF},
{VEHICLE_PARAMS_ON}
};
if(vid != INVALID_VEHICLE_ID)
{
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
new rand = random(sizeof(randomEngine));
SetVehicleParamsEx(vid,randomEngine[rand][1],lights,alarm,doors,bonnet,boot,objective);
}
return 1;
}