AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Compilation Error 213 : Tag Mismatch (https://forums.alliedmods.net/showthread.php?t=87584)

Zombie Lurker 03-14-2009 00:37

Compilation Error 213 : Tag Mismatch
 
Hello everyone. I need some help with my script because I keep getting an error (title).
So here's the script contents :

Quote:

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <engine>
#include <fakemeta>
#include <fun>
#include <zombieplague>
// MysticDeath Atributes
new const zclass_name[] = { "MysticDeath" } // name
new const zclass_info[] = { "HP+++ Speed+ Jump+ Knockback--- Leech+++" } // description
new const zclass_model[] = { "mysticdeath_zombie" } // model
new const zclass_clawmodel[] = { "v_knife_zombie.mdl" } // claw model
const zclass_health = 9000 // health
const zclass_speed = 230 // speed
const Float:zclass_gravity = 0.85 // gravity
const Float:zclass_knockback = 0 // knockback
const zclass_infecthp = 2500 // extra hp for infections
// Class IDs
new g_mysticdeath
// Zombie Classes MUST be registered on plugin_precache
public plugin_precache()
{
// Register the new class and store ID for reference
g_mysticdeath = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)
}
// User Infected forward
public zp_user_infected_post(id, infector)
{
// If attacker is a mysticdeath, gets extra hp
if (zp_get_user_zombie_class(infector) == g_mysticdeath)
set_pev(infector, pev_health, float(pev(infector, pev_health) + zclass_infecthp))
}
Here is the error (sorry couldnt put up a picture, my internet too slow) :
Quote:

//// zp_class_mysticdeath.sma
// C:\Program Files\Valve\cstrike\addons\amxmodx\scripting\ zp_class_mysticdeath.sma : warning 213: tag mismatch
//Header size: 384 bytes
//Code size: 340 bytes
//Data size: 368 bytes
Stack/heal size: 16384 bytes; estimated max. usage=780 cells <3120 bytes>
//Total requirements: 17476 bytes
//
//1 Warning.
//Done.
//
// Compilation Time: 0.45 sec
// --------------------------------------
Please help me by posting a reply. :cry:

TheRadiance 03-14-2009 01:31

Re: Compilation Error 213 : Tag Mismatch
 
PHP Code:

const Float:zclass_knockback // knockback 

:arrow:
PHP Code:

const Float:zclass_knockback 0.0 // knockback 


Zombie Lurker 03-14-2009 05:47

Re: Compilation Error 213 : Tag Mismatch
 
Thanks alot TheRadiance! +karma for you.

xPaw 03-14-2009 06:06

Re: Compilation Error 213 : Tag Mismatch
 
those includes wasnt needed, also use tabs, to be more clean :]
Code:
#include <amxmodx> #include <fakemeta> #include <zombieplague> // MysticDeath Atributes new g_mysticdeath new const zclass_name[]     = { "MysticDeath" } // name new const zclass_info[]     = { "HP+++ Speed+ Jump+ Knockback--- Leech+++" } // description new const zclass_model[]    = { "mysticdeath_zombie" } // model new const zclass_clawmodel[]    = { "v_knife_zombie.mdl" } // claw model const zclass_health     = 9000  // health const zclass_speed      = 230   // speed const Float:zclass_gravity  = 0.85  // gravity const Float:zclass_knockback    = 0.0   // knockback const zclass_infecthp       = 2500  // extra hp for infections // Zombie Classes MUST be registered on plugin_precache public plugin_precache() {     // Register the new class and store ID for reference     g_mysticdeath = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback) } // User Infected forward public zp_user_infected_post(id, infector) {     // If attacker is a mysticdeath, gets extra hp     if( zp_get_user_zombie_class(infector) == g_mysticdeath )         set_pev( infector, pev_health, float(pev(infector, pev_health) + zclass_infecthp) ) }

Zombie Lurker 03-15-2009 05:28

Re: Compilation Error 213 : Tag Mismatch
 
Oh ok it sure looks more clean than my old one. Thanks!

Wentix 03-17-2009 05:02

Re: Compilation Error 213 : Tag Mismatch
 
Have that problem too

Code:


time = (thetime() - Timer[id]) + PauseTime[id];

warning 213: tag mismatch


what is problem here? Its just warning, but...

Arkshine 03-17-2009 05:58

Re: Compilation Error 213 : Tag Mismatch
 
Make sure that 'time' is a float. Also, time is native name, you should rename your var.

Dores 03-17-2009 10:10

Re: Compilation Error 213 : Tag Mismatch
 
Quote:

Originally Posted by arkshine (Post 782577)
...Also, time is native name, you should rename your var.

Does it effect the compilation/plugin?

Arkshine 03-17-2009 10:19

Re: Compilation Error 213 : Tag Mismatch
 
Actually ( just tested I was not sure ) it doesn't matter, 'time' can be used.


All times are GMT -4. The time now is 09:00.

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