Hey Leute,
sobald ich auf meinen Homeserver connecte, wirft die Konsole diese Fehler aus:
[15:17:58] [debug] Run time error 4: "Array index out of bounds"
[15:17:58] [debug] Accessing element at index 65535 past array upper bound 599
[15:17:58] [debug] AMX backtrace:[pwn]FahrzeugInfo[i][fz_ID] = s_CreateVehicle(FahrzeugInfo[i][fz_Model],FahrzeugInfo[i][fz_X],FahrzeugInfo[i][fz_Y],FahrzeugInfo[i][fz_Z],FahrzeugInfo[i][fz_A],FahrzeugInfo[i][fz_Farbe1],FahrzeugInfo[i][fz_Farbe2],-1);[/pwn]
[15:17:58] [debug] #0 001130b0 in s_CreateVehicle (vehicletype=0, Float:x=0.00000, Float:y=0.00000, Float:z=0.00000, Float:rotation=0.00000, color1=0, color2=0, respawn_delay=-1) at D:\Domi\Spiele\GTA San Andreas\Selfmade\gamemodes\inventar.pwn:27228
[15:17:58] [debug] #1 000e7f28 in LoadPlayercar (playerid=0, slot=0) at D:\Domi\Spiele\GTA San Andreas\Selfmade\gamemodes\inventar.pwn:22936
[15:17:58] [debug] #2 000e6ef4 in AutosysLoadplayer (playerid=0) at D:\Domi\Spiele\GTA San Andreas\Selfmade\gamemodes\inventar.pwn:22892
[15:17:58] [debug] #3 000c26f8 in LoadPlayer (playerid=0) at D:\Domi\Spiele\GTA San Andreas\Selfmade\gamemodes\inventar.pwn:19379
[15:17:58] [debug] #4 0009294c in public OnPlayerClickTextDraw (playerid=0, Text:clickedid=44) at D:\Domi\Spiele\GTA San Andreas\Selfmade\gamemodes\inventar.pwn:15116
Zeile 22936:
stock LoadPlayercar(playerid,slot)
{
if(slot == -1)return 1;
new slotstr[16];
valstr(slotstr,slot);
for(new i=0;i<MAX_VEHICLES;i++)
{
if(FahrzeugInfo[i][fz_ID] == 0)
{
FahrzeugInfo[i][fz_Besitzer] = playerid;
FahrzeugInfo[i][fz_Typ] = 1;
FahrzeugInfo[i][fz_Slot] = slot;
FahrzeugInfo[i][fz_Preis] = mysql_GetInt("userautos","Preis","Slot",slotstr);
FahrzeugInfo[i][fz_Model] = mysql_GetInt("userautos","Model","Slot",slotstr);
FahrzeugInfo[i][fz_Farbe1] = mysql_GetInt("userautos","Farbe1","Slot",slotstr);
FahrzeugInfo[i][fz_Farbe2] = mysql_GetInt("userautos","Farbe2","Slot",slotstr);
FahrzeugInfo[i][fz_X] = mysql_GetFloat("userautos","X","Slot",slotstr);
FahrzeugInfo[i][fz_Y] = mysql_GetFloat("userautos","Y","Slot",slotstr);
FahrzeugInfo[i][fz_Z] = mysql_GetFloat("userautos","Z","Slot",slotstr);
FahrzeugInfo[i][fz_A] = mysql_GetFloat("userautos","A","Slot",slotstr);
FahrzeugInfo[i][fz_mod1] = mysql_GetInt("userautos","mod1","Slot",slotstr);
FahrzeugInfo[i][fz_mod2] = mysql_GetInt("userautos","mod2","Slot",slotstr);
FahrzeugInfo[i][fz_mod3] = mysql_GetInt("userautos","mod3","Slot",slotstr);
FahrzeugInfo[i][fz_mod4] = mysql_GetInt("userautos","mod4","Slot",slotstr);
FahrzeugInfo[i][fz_mod5] = mysql_GetInt("userautos","mod5","Slot",slotstr);
FahrzeugInfo[i][fz_mod6] = mysql_GetInt("userautos","mod6","Slot",slotstr);
FahrzeugInfo[i][fz_mod7] = mysql_GetInt("userautos","mod7","Slot",slotstr);
FahrzeugInfo[i][fz_mod8] = mysql_GetInt("userautos","mod8","Slot",slotstr);
FahrzeugInfo[i][fz_mod9] = mysql_GetInt("userautos","mod9","Slot",slotstr);
FahrzeugInfo[i][fz_mod10] = mysql_GetInt("userautos","mod10","Slot",slotstr);
FahrzeugInfo[i][fz_mod11] = mysql_GetInt("userautos","mod11","Slot",slotstr);
FahrzeugInfo[i][fz_mod12] = mysql_GetInt("userautos","mod12","Slot",slotstr);
FahrzeugInfo[i][fz_mod13] = mysql_GetInt("userautos","mod13","Slot",slotstr);
FahrzeugInfo[i][fz_mod14] = mysql_GetInt("userautos","mod14","Slot",slotstr);
FahrzeugInfo[i][fz_Tank] = mysql_GetInt("userautos","Tank","Slot",slotstr);
FahrzeugInfo[i][fz_Opark] = mysql_GetInt("userautos","Opark","Slot",slotstr);
FahrzeugInfo[i][fz_Glas] = mysql_GetInt("userautos","Glas","Slot",slotstr);
FahrzeugInfo[i][fz_Panzer] = mysql_GetInt("userautos","Panzer","Slot",slotstr);
FahrzeugInfo[i][fz_Lock] = 0; // Zeile 22724
FahrzeugInfo[i][fz_Radio] = 0;
FahrzeugInfo[i][fz_ID] = s_CreateVehicle(FahrzeugInfo[i][fz_Model],FahrzeugInfo[i][fz_X],FahrzeugInfo[i][fz_Y],FahrzeugInfo[i][fz_Z],FahrzeugInfo[i][fz_A],FahrzeugInfo[i][ [fz_Farbe1],FahrzeugInfo[i][fz_Farbe2],-1); // Fehler Zeile
new vID = FahrzeugInfo[i][fz_ID];
FahrzeugInfo[i][fz_Motor] = 0;
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(FahrzeugInfo[i][fz_ID], engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(FahrzeugInfo[i][fz_ID], engine, lights, alarm, 0, bonnet, boot, objective);
hbremse[vID][hb_Status] = mysql_GetInt("userautos","HandBremse","Slot",slotstr);
if(FahrzeugInfo[i][fz_Opark] == 1)
{
hbremse[vID][hb_Status] = 2;
}
SetVehicleNumberPlate(vID,SpielerName(playerid));
if(FahrzeugInfo[i][fz_mod1] != -1){AddVehicleComponent(vID,FahrzeugInfo[i][fz_mod1]);}
if(FahrzeugInfo[i][fz_mod2] != -1){AddVehicleComponent(vID,FahrzeugInfo[i][fz_mod2]);}
if(FahrzeugInfo[i][fz_mod3] != -1){AddVehicleComponent(vID,FahrzeugInfo[i][fz_mod3]);}
if(FahrzeugInfo[i][fz_mod4] != -1){AddVehicleComponent(vID,FahrzeugInfo[i][fz_mod4]);}
if(FahrzeugInfo[i][fz_mod5] != -1){AddVehicleComponent(vID,FahrzeugInfo[i][fz_mod5]);}
if(FahrzeugInfo[i][fz_mod6] != -1){AddVehicleComponent(vID,FahrzeugInfo[i][fz_mod6]);}
if(FahrzeugInfo[i][fz_mod7] != -1){AddVehicleComponent(vID,FahrzeugInfo[i][fz_mod7]);}
if(FahrzeugInfo[i][fz_mod8] != -1){AddVehicleComponent(vID,FahrzeugInfo[i][fz_mod8]);}
if(FahrzeugInfo[i][fz_mod9] != -1){AddVehicleComponent(vID,FahrzeugInfo[i][fz_mod9]);}
if(FahrzeugInfo[i][fz_mod10] != -1){AddVehicleComponent(vID,FahrzeugInfo[i][fz_mod10]);}
if(FahrzeugInfo[i][fz_mod11] != -1){AddVehicleComponent(vID,FahrzeugInfo[i][fz_mod11]);}
if(FahrzeugInfo[i][fz_mod12] != -1){AddVehicleComponent(vID,FahrzeugInfo[i][fz_mod12]);}
if(FahrzeugInfo[i][fz_mod13] != -1){AddVehicleComponent(vID,FahrzeugInfo[i][fz_mod13]);}
if(FahrzeugInfo[i][fz_mod14] != -1){AddVehicleComponent(vID,FahrzeugInfo[i][fz_mod14]);}
return 1;
}
}
return 1;
}
Zeile 22892:
stock AutosysLoadplayer(playerid)
{
SpielerInfo[playerid][auto1] = mysql_GetInt("accounts","auto1","Name",SpielerName(playerid));
SpielerInfo[playerid][auto2] = mysql_GetInt("accounts","auto2","Name",SpielerName(playerid));
SpielerInfo[playerid][auto3] = mysql_GetInt("accounts","auto3","Name",SpielerName(playerid));
LoadPlayercar(playerid,SpielerInfo[playerid][auto1]);
LoadPlayercar(playerid,SpielerInfo[playerid][auto2]); // Fehlerzeile
LoadPlayercar(playerid,SpielerInfo[playerid][auto3]);
return 1;
}
Zeile: 27228:
stock s_CreateVehicle(vehicletype,Float:x,Float:y,Float:z,Float:rotation,color1,color2,respawn_delay)
{
new vID = CreateVehicle(vehicletype,x,y,z,rotation,color1,color2,respawn_delay);
CheckPanzerung(vID,-1);
hbremse[vID][hb_Status] = 0; // Fehlerzeile
hbremse[vID][hb_X] = x;
hbremse[vID][hb_Y] = y;
hbremse[vID][hb_A] = rotation;
return vID;
}
Zeile 19379:
LoadPlayerInv(playerid);
Der dazugehörige stock:
stock LoadPlayerInv(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
SetPVarInt(playerid,"b_zig", mysql_GetInt("inventar", "b_zig", "Name", name));
SetPVarInt(playerid,"m_zig", mysql_GetInt("inventar", "m_zig", "Name", name));
SetPVarInt(playerid,"t_zig", mysql_GetInt("inventar", "t_zig", "Name", name));
SetPVarInt(playerid,"Mats", mysql_GetInt("inventar", "Mats", "Name", name));
SetPVarInt(playerid,"Marihuana", mysql_GetInt("inventar", "Marihuana", "Name", name));
SetPVarInt(playerid,"Heroin", mysql_GetInt("inventar", "Heroin", "Name", name));
SetPVarInt(playerid,"Coins", mysql_GetInt("inventar", "Coins", "Name", name));
SetPVarInt(playerid,"Kanister", mysql_GetInt("inventar", "Kanister", "Name", name));
SetPVarInt(playerid,"Masken", mysql_GetInt("inventar", "Masken", "Name", name));
//SetPVarInt(playerid,"Wurfel", mysql_GetInt("accounts", "Wurfel", "Name", name));
}
Zeile 15116:
for(new i=0;i<10;i++) // Fehlerzeile
{
SCM(playerid,WHITE," ");
}
Dieser Fehler ist bei dem Calöback (OnPlayerClickTextdraw)
Wisst ihr was ich für ein Problem habe?
Liegt es an den PVar's? (das script läuft überwiegend nur über PVar's)
Oder was ist es dann?
Danke schonmal!