Raised This Month: $ Target: $400
 0% 

Tag Mismatch?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mateo10
Veteran Member
Join Date: Jan 2006
Old 12-05-2006 , 12:19   Tag Mismatch?
Reply With Quote #1

Why do I get tag mismatch in this code?
Code:
public spycard(id) {     if(!get_pcvar_num(g_SpyCard))         return PLUGIN_CONTINUE             new name[32]     get_user_name(id, name, 31)         set_hudmessage(0, 0, 255, 0.0, 0.3, 0, 6.0, 12.0)     show_hudmessage(id, "%s looks like an enemy now...", name)         new CsTeam = cs_get_user_team(id)     new rand4 = random_num(1, 4) //<------Here i get tag mismatch         switch(rand4)     {         case 1:         {             if(CsTeam == 1)             {                 cs_set_user_model(id, "sas")             } else {                 cs_set_user_model(id, "leet")             }         }         case 2:         {             if(CsTeam == 1)             {                 cs_set_user_model(id, "gsg9")             } else {                 cs_set_user_model(id, "arctic")             }         }         case 3:         {             if(CsTeam == 1)             {                 cs_set_user_model(id, "gign")             } else {                 cs_set_user_model(id, "guerilla")             }         }         case 4:         {             if(CsTeam == 1)             {                 cs_set_user_model(id, "urban")             } else {                 cs_set_user_model(id, "phoenix")             }         }     }     return PLUGIN_CONTINUE }
mateo10 is offline
The Specialist
BANNED
Join Date: Nov 2006
Old 12-05-2006 , 12:22   Re: Tag Mismatch?
Reply With Quote #2

can you post your sma so i can t ry to compile it and see whats wrong
The Specialist is offline
Send a message via AIM to The Specialist
mateo10
Veteran Member
Join Date: Jan 2006
Old 12-05-2006 , 12:34   Re: Tag Mismatch?
Reply With Quote #3

Sure
Attached Files
File Type: sma Get Plugin or Get Source (cards.sma - 759 views - 10.2 KB)
mateo10 is offline
jim_yang
Veteran Member
Join Date: Aug 2006
Old 12-05-2006 , 12:40   Re: Tag Mismatch?
Reply With Quote #4

the problem is here
new CsTeam = cs_get_user_team(id)
should be
new CsTeams:team = cs_get_user_team(id)
then deal with team
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
P34nut
AMX Mod X Beta Tester
Join Date: Feb 2006
Location: Netherlands
Old 12-05-2006 , 12:42   Re: Tag Mismatch?
Reply With Quote #5

change
Code:
new CsTeam = cs_get_user_team(id)

to

Code:
new CsTeam = get_user_team(id)

not the best way to fix this but it works...
__________________
All you need to change the world is one good lie and a river of blood
P34nut is offline
The Specialist
BANNED
Join Date: Nov 2006
Old 12-05-2006 , 12:46   Re: Tag Mismatch?
Reply With Quote #6

i have a question about the return of get_user_team . what value does it return for teams ??
The Specialist is offline
Send a message via AIM to The Specialist
jim_yang
Veteran Member
Join Date: Aug 2006
Old 12-05-2006 , 12:47   Re: Tag Mismatch?
Reply With Quote #7

0 unassigned
1 t
2 ct
3 spectator
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
The Specialist
BANNED
Join Date: Nov 2006
Old 12-05-2006 , 12:57   Re: Tag Mismatch?
Reply With Quote #8

thanks ++karma
The Specialist is offline
Send a message via AIM to The Specialist
mateo10
Veteran Member
Join Date: Jan 2006
Old 12-05-2006 , 13:07   Re: Tag Mismatch?
Reply With Quote #9

Thank you all for your help
mateo10 is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 12-05-2006 , 22:06   Re: Tag Mismatch?
Reply With Quote #10

Quote:
Originally Posted by The Specialist View Post
i have a question about the return of get_user_team . what value does it return for teams ??
What jim said is correct, but remember the CS_TEAM_* constants are just enumerated constants of these values.
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 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 06:59.


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