Problem:
HTML Code:
L 02/06/2022 - 00:50:48: [HAMSANDWICH] Wrong data type (data is of type entity)
L 02/06/2022 - 00:50:48: [AMXX] Displaying debug trace (plugin "jail_zyczenia.amxx", version "1.0.7L")
L 02/06/2022 - 00:50:48: [AMXX] Run time error 10: native error (native "SetHamParamFloat")
L 02/06/2022 - 00:50:48: [AMXX] [0] jail_zyczenia.sma::vTracerAttack (line 746)
L 02/06/2022 - 00:50:48: [AMXX] [1] jail_zyczenia.sma::TraceAttack (line 725)
after this server shutting down with this error:
HTML Code:
ERROR : IndexOfEdict: bad entity
Code:
HTML Code:
public TakeDamage(id, ent, attacker, Float:damage, damagebits)
return vTracerAttack(id, attacker, ent);
public TraceAttack(id, attacker, Float:damage, Float:direction[3], tracehandle, damagebits)
return vTracerAttack(id, attacker, -1);
vTracerAttack(id, attacker, ent)
{
if(!pojedynek[0] || !is_user_connected(id) || id == attacker)
return HAM_IGNORED;
if((kandydaci_pojedynek[0] == id || kandydaci_pojedynek[1] == id) && czas_do_pojedynku > 0) {
return HAM_SUPERCEDE;
}
if(pojedynek[0] == id && pojedynek[1] != attacker)
return HAM_SUPERCEDE;
if(pojedynek[0] == attacker && pojedynek[1] != id)
return HAM_SUPERCEDE;
if(is_user_connected(attacker)) {/*
if(typ_pojedynku == 1 && get_pdata_int(id, 75, 5) != HIT_HEAD) {
return HAM_SUPERCEDE;
}
*/
if(typ_pojedynku == 2) {
SetHamParamFloat(4, 999.0);
return HAM_HANDLED;
}
if(bronie_pojedynek == CSW_KNIFE && ent != -1 && !kosy)
{
if(ent == attacker)
return HAM_SUPERCEDE;
new Float:ViewAngle[3], iOrigin[3];
for(new i=0; i<3; i++)
ViewAngle[i] = random_float(-50.0, 50.0);
get_user_origin(id, iOrigin);
message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
write_byte(TE_BLOODSPRITE);
write_coord(iOrigin[0]);
write_coord(iOrigin[1]);
write_coord(iOrigin[2]);
write_short(blood2);
write_short(blood);
write_byte(229);
write_byte(25);
message_end();
set_pev(id, pev_punchangle, ViewAngle);
SetHamParamEntity(2, attacker);
return HAM_IGNORED;
}
}
return HAM_IGNORED;
}
725:
return vTracerAttack(id, attacker, -1);
746:
SetHamParamFloat(4, 999.0);
* bold text is 725 line and 746 in .sma file (from error log)