Hello, does anyone know why i keep getting tag mismatch on line 21?
EDIT!: sorry should have posted the full code
/home/groups/amxmodx/tmp3/phpV0DF7b.sma(21) : warning 213: tag mismatch
/home/groups/amxmodx/tmp3/phpV0DF7b.sma(21) : warning 213: tag mismatch
/home/groups/amxmodx/tmp3/phpV0DF7b.sma(21) : warning 213: tag mismatch
/home/groups/amxmodx/tmp3/phpV0DF7b.sma(39) : warning 213: tag mismatch
/home/groups/amxmodx/tmp3/phpV0DF7b.sma(59) : warning 213: tag mismatch
Header size: 432 bytes
Code size: 1892 bytes
Data size: 328 bytes
Stack/heap size: 16384 bytes; estimated max. usage=40 cells (160 bytes)
Total requirements: 19036 bytes
5 Warnings.
Done.
Code:
<font face="monospace"><font color="#339900">#include <amxmodx>
#include <fakemeta>
#include <engine>
#include <fun>
new Float:event_cooldown[33]
new Float:last_event[33]
public plugin_init()
{
register_concmd("test", "function")
}
stock bool:vacant_hull(const Float:origin[3], hull,id) {
new trace_results = 0
engfunc(EngFunc_TraceHull, origin, origin, 0, hull, id, trace_results)
if (!get_tr2(trace_results , TR_StartSolid) && !get_tr2(trace_results, TR_AllSolid) && get_tr2(trace_results , TR_InOpen))
return true
return false
}
public function(id) {
static Float:time;
global_get(glb_time,time);
event_cooldown[id] = 2.0;
if (time - event_cooldown[id] < last_event[id]) return PLUGIN_HANDLED;
new Float:hull = pev(id, pev_flags) & FL_DUCKING ? HULL_HEAD : HULL_HUMAN
new distance=100
new Float:originalSpot[3],Float:aimVec[3], Float:dest[3]
entity_get_vector(id,EV_VEC_origin,originalSpot)
VelocityByAim(id,distance,aimVec)
dest[0] = originalSpot[0] + aimVec[0]
dest[1] = originalSpot[1] + aimVec[1]
dest[2] = originalSpot[2] + aimVec[2] + 45.0;
entity_set_vector(id,EV_VEC_origin,dest)
if (!vacant_hull(dest, hull,id))
{
dest[0] = originalSpot[0]
dest[1] = originalSpot[1]
dest[2] = originalSpot[2]
entity_set_vector(id,EV_VEC_origin,dest)
}
else return PLUGIN_HANDLED;
last_event[id] = time;
return PLUGIN_HANDLED
}
</font></font>