AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   tag missmatch (https://forums.alliedmods.net/showthread.php?t=217291)

GhostMan 06-01-2013 06:05

tag missmatch
 
PHP Code:

public cmdVmenu(id)
{
    new 
team cs_get_user_team(id)
    new 
isvip get_user_flags(id) & ADMIN_JBVIP
    
    
if(isvip)
    {
        if(
is_user_alive(id))
        {
            if(!
VipUsed[id])
            {
                switch(
team)
                {
                    case 
CS_TEAM_T:
                    {
                        
VipTMenu(id)
                    }
                    
                    case 
CS_TEAM_CT:
                    {
                        
VipCTMenu(id)
                    }
                }
            }
            else
            {
                
client_print_color(idRed"%s Tu jau naudojai ^3VIP MENIU^1, lauk kito round'o."PREFIX)
            }
        }
        else
        {
            
client_print_color(idRed"%s Tu turi buti gyvas, jei nori naudoti ^3/VMENU^1!"PREFIX)
        }
    }
    else
    {
        
client_print_color(idRed"%s Tik ^3VIP ^1zaidejai gali naudoti ^3/VMENU ^1komanda! Rasyk ^3/NORIUVIP^1!"PREFIX)
    }
    return 
PLUGIN_CONTINUE


Line with tag mismatch error
PHP Code:

new isvip get_user_flags(id) & ADMIN_JBVIP 


hornet 06-01-2013 06:11

Re: tag missmatch
 
Variable team needs to be tagged:
Code:

new CsTeams:team = cs_get_user_team(id)
And isvip should be tagged as bool.

GhostMan 06-01-2013 06:16

Re: tag missmatch
 
Still shows tag missmatch warning on this line

PHP Code:

if(isvip

PHP Code:

public cmdVmenu(id)
{
    new 
CsTeams:team cs_get_user_team(id)
    new 
bool:isvip get_user_flags(id) & ADMIN_JBVIP
    
    
if(isvip)
    {
        if(
is_user_alive(id))
        {
            if(!
VipUsed[id])
            {
                switch(
team)
                {
                    case 
CS_TEAM_T:
                    {
                        
VipTMenu(id)
                    }
                    
                    case 
CS_TEAM_CT:
                    {
                        
VipCTMenu(id)
                    }
                }
            }
            else
            {
                
client_print_color(idRed"%s Tu jau naudojai ^3VIP MENIU^1, lauk kito round'o."PREFIX)
            }
        }
        else
        {
            
client_print_color(idRed"%s Tu turi buti gyvas, jei nori naudoti ^3/VMENU^1!"PREFIX)
        }
    }
    else
    {
        
client_print_color(idRed"%s Tik ^3VIP ^1zaidejai gali naudoti ^3/VMENU ^1komanda! Rasyk ^3/NORIUVIP^1!"PREFIX)
    }
    return 
PLUGIN_CONTINUE



hornet 06-01-2013 06:32

Re: tag missmatch
 
Hmm true just remove variable isvip and replace:
Code:

if(isvip)
With:

Code:

if( get_user_flags(id) & ADMIN_JBVIP )


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

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