Raised This Month: $ Target: $400
 0% 

tag mismatch


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 01-03-2010 , 00:10   tag mismatch
Reply With Quote #1

hey,

i wanted to make a mini team balancer and i got following errors :

PHP Code:
new g_msg_teaminfo

new const g_teaminfo[][] = 

    
"UNASSIGNED"
    
"TERRORIST",
    
"CT",
    
"SPECTATOR" 
}

register_logevent("round_end"2"1=Round_End")
g_msg_teaminfo get_user_msgid("TeamInfo")

public 
round_end()
{
    
set_task(0.1"task_balanceteam"375)
}
public 
task_balanceteam()
{
    static 
players[3][32], count[3]
    
get_players(players[CS_TEAM_UNASSIGNED], count[CS_TEAM_UNASSIGNED])
    
    
count[CS_TEAM_T] = 0
    count
[CS_TEAM_CT] = 0
    
    
static iidteam
    
for(0count[CS_TEAM_UNASSIGNED]; i++)
    {
        
id players[CS_TEAM_UNASSIGNED][i
        
team fm_get_user_team(id)
        
        if(
team == CS_TEAM_T || team == CS_TEAM_CT)
            
players[team][count[team]++] = id
    
}

    if(
abs(count[CS_TEAM_T] - count[CS_TEAM_CT]) <= 1
        return

    static 
maxplayers
    maxplayers 
= (count[CS_TEAM_T] + count[CS_TEAM_CT]) / 2
    
    
if(count[CS_TEAM_T] > maxplayers)
    {
        for(
0< (count[CS_TEAM_T] - maxplayers); i++)
            
fm_set_user_team(players[CS_TEAM_T][i], CS_TEAM_CT0)
    }
    else
    {
        for(
0< (count[CS_TEAM_CT] - maxplayers); i++)
            
fm_set_user_team(players[CS_TEAM_CT][i], CS_TEAM_T0)
    }
}
stock fm_set_user_team(indexteamupdate 1)
{
    
set_pdata_int(indexOFFSET_TEAMteam)
    if(
update)
    {
        
emessage_begin(MSG_ALLg_msg_teaminfo)
        
ewrite_byte(index)
        
ewrite_string(g_teaminfo[team])
        
emessage_end()
    }
    return 
1

PHP Code:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c1997-2006 ITB CompuPhaseAMX Mod X Team

Warning
Loose indentation on line 3310
Warning
Tag mismatch on line 3310
Warning
Tag mismatch on line 3310
Warning
Loose indentation on line 3312
Warning
Tag mismatch on line 3312
Warning
Tag mismatch on line 3313
Warning
Tag mismatch on line 3316
Warning
Tag mismatch on line 3318
Warning
Tag mismatch on line 3321
Warning
Tag mismatch on line 3321
Warning
Tag mismatch on line 3325
Warning
Tag mismatch on line 3325
Warning
Tag mismatch on line 3329
Warning
Tag mismatch on line 3329
Warning
Tag mismatch on line 3331
Warning
Tag mismatch on line 3333
Warning
Tag mismatch on line 3334
Warning
Tag mismatch on line 3334
Warning
Tag mismatch on line 3338
Warning
Tag mismatch on line 3339
Warning
Tag mismatch on line 3339
Header size
:           1716 bytes
Code size
:             9356 bytes
Data size
:             3812 bytes
Stack
/heap size:      16384 bytesestimated maxusage=780 cells (3120 bytes)
Total requirements:   31268 bytes

21 Warnings
.
Done
know anyone why its so?
__________________

Last edited by One; 01-03-2010 at 00:27.
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
Mxnn
Veteran Member
Join Date: Aug 2009
Location: AT MY HOME
Old 01-03-2010 , 00:16   Re: tag mismatch
Reply With Quote #2

You don't have to clear the variables in pawn.

To delete the warning "Loose identation" you have to put Control+I in AMX Studio.

And for the tag mismatch: which are those lines?
Mxnn is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 01-03-2010 , 00:24   Re: tag mismatch
Reply With Quote #3

so tried with ctrl I and the same


line 3310 =

get_players(players[CS_TEAM_UNASSIGNED], count[CS_TEAM_UNASSIGNED])

edit : first post updated.

__________________

Last edited by One; 01-03-2010 at 00:27.
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-03-2010 , 01:25   Re: tag mismatch
Reply With Quote #4

If you notice there is one tag mismatch for every CS_TEAM_* that is used. That should give you a clue what is causing it.

...

It's CS_TEAM_* !!

put "_:" before each one.
__________________
fysiks is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 01-03-2010 , 01:45   Re: tag mismatch
Reply With Quote #5

oh. ty my bad its working now
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-03-2010 , 04:52   Re: tag mismatch
Reply With Quote #6

Why cs_set_user_team() is not used ?
__________________
Arkshine is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 01-03-2010 , 05:04   Re: tag mismatch
Reply With Quote #7

i wanted to experiment again

now using cstrike
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 01-03-2010 , 06:05   Re: tag mismatch
Reply With Quote #8

just create players variable with CsTeams: prefix
__________________
xPaw 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 04:08.


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