L 11/06/2012 - 16:05:51: [AMXX] Displaying debug trace (plugin "QTM_CodMod.amxx")
L 11/06/2012 - 16:05:51: [AMXX] Run time error 4: index out of bounds
L 11/06/2012 - 16:05:51: [AMXX] [0] QTM_CodMod.sma::NowaRunda (line 874)
L 11/06/2012 - 16:07:01: [AMXX] Displaying debug trace (plugin "QTM_CodMod.amxx")
L 11/06/2012 - 16:07:01: [AMXX] Run time error 4: index out of bounds
L 11/06/2012 - 16:07:01: [AMXX] [0] QTM_CodMod.sma::NowaRunda (line 874)
co dodałem:
new const Enty[][] = {
"rocket",
"medkit",
"mine"
}
public NowaRunda()
{
freezetime = true;
for(new iEnt=0; iEnt <= sizeof Enty; iEnt++)
{
new idEnt = find_ent_by_class(-1, Enty[iEnt]); // linia 874
while(idEnt > 0)
{
remove_entity(idEnt);
idEnt = find_ent_by_class(idEnt, Enty[iEnt]);
}
}
}
oraz funkcja która jest wykonywana przez Client_Disconnect
public UsunEnty(id)
{
for(new iEnt=0; iEnt <= sizeof Enty; iEnt++)
{
new idEnt = find_ent_by_class(0, Enty[iEnt]);
while(idEnt > 0)
{
if(entity_get_edict(idEnt, EV_ENT_owner) == id)
remove_entity(idEnt);
idEnt = find_ent_by_class(idEnt, Enty[iEnt]);
}
}
}
Może ktoś powiedzieć co jest przyczyną Erroru ??
Użytkownik Pan PrO edytował ten post 06.11.2012 16:24