Raised This Month: $51 Target: $400
 12% 

Tag mismatch (CsTeams)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
W12
Member
Join Date: Sep 2013
Old 02-04-2014 , 10:28   Tag mismatch (CsTeams)
Reply With Quote #1

I have this:

PHP Code:
enum _iParticipants
{
    
FIRST 0,
    
SECOND
};

new 
CsTeamsg_iTeamsiParticipants ]; 
PHP Code:
new CsTeamsiAux;

iAux g_iTeamsFIRST ];
g_iTeamsFIRST ] = g_iTeamsSECOND ];
g_iTeamsSECOND ] = iAux
I got tag mismatch warning on these lines:

PHP Code:
g_iTeamsFIRST ] = g_iTeamsSECOND ];
g_iTeamsSECOND ] = iAux
If I use "_:" warnings disappear, but I don't understand why. These 2 vars should be the same type...

Thanks anticipated.

Last edited by W12; 02-04-2014 at 10:32.
W12 is offline
Old 02-04-2014, 10:50
YamiKaitou
This message has been deleted by YamiKaitou. Reason: Phone didn't scroll down the code block
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 02-04-2014 , 11:06   Re: Tag mismatch (CsTeams)
Reply With Quote #2

You can change to
PHP Code:
enum iParticipants
{
    
CsTeams:FIRST 0,
    
CsTeams:SECOND
}; 
if you dont want to use '_:'.
mottzi is offline
Send a message via MSN to mottzi
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 02-04-2014 , 11:41   Re: Tag mismatch (CsTeams)
Reply With Quote #3

new CsTeams:g_iParticipants[33];

g_iParticipant[id] = CS_TEAM_T
g_iParticipant[iPlayer] = CS_TEAM_CT;

If you need to use for players, i think it is better to use an array to store the players and use an or other players.

If you need to store by teams, use

new g_iTeams[CsTeams];
g_iTeams[CS_TEAM_T] = id;
g_iTeams[CS_TEAM_CT] = iPlayer;

And store the array

use as mottzi posted, this shoud work too
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 

Last edited by ^SmileY; 02-04-2014 at 11:42.
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
W12
Member
Join Date: Sep 2013
Old 02-05-2014 , 15:30   Re: Tag mismatch (CsTeams)
Reply With Quote #4

Quote:
Originally Posted by mottzi View Post
You can change to
PHP Code:
enum iParticipants
{
    
CsTeams:FIRST 0,
    
CsTeams:SECOND
}; 
if you dont want to use '_:'.
It works.
Thanks to both of you.
W12 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 07:48.


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