Raised This Month: $ Target: $400
 0% 

Tag mismatch


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Contrus
Junior Member
Join Date: Jul 2007
Old 08-30-2007 , 14:45   Tag mismatch
Reply With Quote #1

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>


Last edited by Contrus; 08-30-2007 at 15:29.
Contrus is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-30-2007 , 15:03   Re: Tag mismatch
Reply With Quote #2

I've pasted this code into a plugin and it compiles fine...
__________________
Arkshine is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 08-30-2007 , 16:20   Re: Tag mismatch
Reply With Quote #3

Quote:
Originally Posted by arkshine View Post
I've pasted this code into a plugin and it compiles fine...
Hmm , strange ...for me was the same errors but i fixed and tested the code ; seems to work.... :S

Code:
#include <amxmodx>
#include <fakemeta>
 
#define PLUGIN "Teleport"
#define VERSION "1.0"
#define AUTHOR "Contrus"
 
#define MAX_PLAYERS 32
 
new Float:event_cooldown[MAX_PLAYERS + 1];
new Float:last_event[MAX_PLAYERS + 1];
 
public plugin_init() {
 
 register_plugin(PLUGIN, VERSION, AUTHOR);
 
 register_clcmd("teleport", "teleport_player");
}
 
public teleport_player(id)
{
 new Float:game_time = get_gametime();
 
 event_cooldown[id] = 2.0;
 
 if(game_time - event_cooldown[id] < last_event[id])
  return 1;
 
 new Hull = pev(id, pev_flags) & FL_DUCKING ? HULL_HEAD : HULL_HUMAN
 
 new Distance = 500;
 
 new Float:Origin[3],Float:AimVec[3], Float:Dest[3];
 pev(id, pev_origin, Origin);
 
 velocity_by_aim(id, Distance, AimVec);
 
 Dest[0] = Origin[0] + AimVec[0];
 Dest[1] = Origin[1] + AimVec[1];
 Dest[2] = Origin[2] + AimVec[2] + 45.0;
 
 engfunc(EngFunc_SetOrigin, id, Dest);
 
 if(!vacant_hull(Dest, Hull, id))
 {
  Dest[0] = Origin[0];
  Dest[1] = Origin[1];
  Dest[2] = Origin[2];
 
  engfunc(EngFunc_SetOrigin, id, Dest);
 }
 else
  return 1;
 
 last_event[id] = game_time;
 
 return 1;
}
 
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;
}
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Contrus
Junior Member
Join Date: Jul 2007
Old 08-31-2007 , 10:37   Re: Tag mismatch
Reply With Quote #4

Thanks alot +karma!
Contrus is offline
kp_uparrow
Penalized Member
Join Date: Jun 2006
Location: 192.168.0.1
Old 09-02-2007 , 13:57   Re: Tag mismatch
Reply With Quote #5

does that when <engine> is included
__________________
I USED A SECOND ACCOUNT TO DO MORE KARMA UPS AND DOWNS UNTIL GREENTRYST CAUGHT ME
kp_uparrow is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 09-02-2007 , 15:19   Re: Tag mismatch
Reply With Quote #6

Quote:
Originally Posted by kp_uparrow View Post
does that when <engine> is included
#Off : Actually yeah, because engine sux!
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:06.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode