L 11/07/2013 - 17:42:26: [ENGINE] Invalid entity 80
L 11/07/2013 - 17:42:26: [AMXX] Displaying debug trace (plugin "npc.amxx")
L 11/07/2013 - 17:42:26: [AMXX] Run time error 10: native error (native "entity_set_float")
L 11/07/2013 - 17:42:26: [AMXX] [0] npc.sma::set_entity_anim (line 507)
L 11/07/2013 - 17:42:26: [AMXX] [1] npc.sma::stop_run (line 326)
Plugin works fine, but if npc doing skill (before it, i wrote "sv_restart 1") and skill animation in progress - the game is restarted and this error occurs. What's that?
From source:
Code:
public stop_run(ent)
{
push_and_crush = 0
set_entity_anim(ent, 8) -------------------line 326
entity_set_int(ent, EV_INT_movetype, MOVETYPE_NONE)
entity_set_float(ent, EV_FL_takedamage, 1.0)
entity_set_float(ent, EV_FL_nextthink, get_gametime() + 0.1)
}
Anim stock code
Code:
stock set_entity_anim(ent, anim)
{
entity_set_float(ent, EV_FL_animtime, get_gametime())
entity_set_float(ent, EV_FL_framerate, 1.0)
entity_set_float(ent, EV_FL_frame, 0.0)
entity_set_int(ent, EV_INT_sequence, anim)
}