AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [MACRO] warning 213: tag mismatch (https://forums.alliedmods.net/showthread.php?t=173330)

Nightfall1 12-03-2011 17:51

[MACRO] warning 213: tag mismatch
 
I have a problems with #define is give me a loot of error warning 213: tag mismatch
Is there something wrong in my code?

PHP Code:

#define BitFlag_GiveIt(%0,%1)        ( ( %0 ) |= ( %1 ) )
#define BitFlag_TakeIt(%0,%1)        ( ( %0 ) &= ~( %1 ) )
#define INI_Zek(%1,%2,%3) \
    
if(!strcmp((%1),name,true))return boolstr(value) ? BitFlag_GiveIt(%2, %3) : BitFlag_TakeIt(%2, %3


Please help me to find a better solution or anything else.

fysiks 12-03-2011 18:29

Re: [MACRO] warning 213: tag mismatch
 
1. I get no warnings.
2. Does it work?

Nightfall1 12-04-2011 05:41

Re: [MACRO] warning 213: tag mismatch
 
I try no define and is work

PHP Code:

// Public where I use
public AccountDataLoad(playeridtag[], name[], value[])
{
    if(!
strcmp("CityIsSelected",name,true))
    {
        if(
boolstr(value))
            
BitFlag_GiveIt(g_PlayerFlags[playerid],IsHasCitySelected);
        else
            
BitFlag_TakeIt(g_PlayerFlags[playerid],IsHasCitySelected);
    }


PHP Code:

// Bit Flag and Bit Enum
enum PlayerFlags:(<<= 1)
{
    
IsHasCitySelected 1,
}
new 
PlayerFlags:g_PlayerFlags[MAX_PLAYERS]; 


fysiks 12-04-2011 12:30

Re: [MACRO] warning 213: tag mismatch
 
Quote:

Originally Posted by Nightfall1 (Post 1607408)
I try no define and is work

PHP Code:

// Public where I use
public AccountDataLoad(playeridtag[], name[], value[])
{
    if(!
strcmp("CityIsSelected",name,true))
    {
        if(
boolstr(value))
            
BitFlag_GiveIt(g_PlayerFlags[playerid],IsHasCitySelected);
        else
            
BitFlag_TakeIt(g_PlayerFlags[playerid],IsHasCitySelected);
    }


PHP Code:

// Bit Flag and Bit Enum
enum PlayerFlags:(<<= 1)
{
    
IsHasCitySelected 1,
}
new 
PlayerFlags:g_PlayerFlags[MAX_PLAYERS]; 


Problem solved then. Using a preprocessor definition was not appropriate for that third one anyway.


All times are GMT -4. The time now is 08:31.

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