Code
C:\Users\Asuus\Desktop\German Reallife 1.0\gamemodes\GeR[1.04].pwn(12117) : error 032: array index out of bounds (variable "Carlist")
C:\Users\Asuus\Desktop\German Reallife 1.0\gamemodes\GeR[1.04].pwn(12131) : error 032: array index out of bounds (variable "Carlist")
C:\Users\Asuus\Desktop\German Reallife 1.0\gamemodes\GeR[1.04].pwn(12132) : error 032: array index out of bounds (variable "Carlist")
Unzwar ich hab die errors hier nur ich hab keine ahnung wie ich das jetzt fixxe ..
PHP
if(newstate == PLAYER_STATE_DRIVER){
gLastCar[playerid] = GetPlayerVehicleID(playerid);
new vehicleid = GetPlayerVehicleID(playerid);
/*Zeile 0 */ Carlist[vehicleid][Kilometer] += GetDistanceToLastPoint(vehicleid);
/*format(string,sizeof(string),"~y~Name: \t~w~%s~n~~g~KM/H:\t~w~ 0~n~~g~Benzin:\t~w~ %d", VehNames[GetVehicleModel(GetPlayerVehicleID(playerid))-400], Gas[GetPlayerVehicleID(playerid)]);
TextDrawShowForPlayer(playerid, Tacho[playerid]);*/
format(string,sizeof(string),"~g~ %s",VehNames[GetVehicleModel(GetPlayerVehicleID(playerid))-400]);
TextDrawSetString(Tacho2[playerid], string); // Name
format(string,sizeof(string),"0 KM/H"); // Geschwindigkeit
TextDrawSetString(Tacho3[playerid], string);
/*format(string,sizeof(string),"%d L",Gas[GetPlayerVehicleID(playerid)]);
TextDrawSetString(Tacho7[playerid], string); // Liter / Tank
//530.345520+(((630.755493-530.345520)/100)*Gas[VID]),0.0);*/
/*Zeile1 */ Carlist[vehicleid][Kilometer] += GetDistanceToLastPoint(vehicleid);
/*Zeile 2 */ format(string,sizeof(string),"~r~Km:~n~~w~%i.%iKM",Carlist[vehicleid][Kilometer]/1000,Carlist[vehicleid][Kilometer]%1000);
PlayerTextDrawSetString(playerid,Tacho7[playerid],string);//digitale km anzeige
GetVehiclePos(vehicleid,Carlist[vehicleid][pos_x],Carlist[vehicleid][pos_y],Carlist[vehicleid][z_angle]);
Alles anzeigen
meine ahCar
PHP
enum ahCar
{
Carid,
OwnerID,
Typ,
Float:pos_x,
Float:pos_y,
Float:pos_z,
Float:z_angle,
Status,
Lock,
Paintjob,
Farbe1,
Farbe2,
mod1,
mod2,
mod3,
mod4,
mod5,
mod6,
mod7,
mod8,
mod9,
mod10,
mod11,
mod12,
mod13,
mod14,
mod15,
mod16,
mod17,
Float:SpawnSaveX,
Float:SpawnSaveY,
Float:SpawnSaveZ,
Float:SpawnSaveRot,
TankVolumen,
RepairTime,
Versicherung,
StandTime,
Meter,
Kilometer,
};
new Carlist[MAX_PLAYERS][3][ahCar];
Alles anzeigen