AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Solved cs_get_user_team (https://forums.alliedmods.net/showthread.php?t=318753)

LearninG 09-18-2019 12:46

cs_get_user_team
 
what is tag mismatch for ? , however it compiles with "get_user_team" and there are no warnings.
Code:
#include <amxmodx> #include <cstrike> public team(id) {     new team     team = cs_get_user_team(id)     switch(team)     {         case CS_TEAM_T:         {         }         case CS_TEAM_CT:         {         }         case CS_TEAM_SPECTATOR:         {         }     } }
line 7--8 :
Code:
team = cs_get_user_team(id) switch(team)
Code:

D:\Ali\Counter-Strike 1.6\cstrike\addons\amxmodx\scripting\2.sma(7 -- 8) : warning 213: tag mismatch
Header size:            228 bytes
Code size:              212 bytes
Data size:              20 bytes
Stack/heap size:      16384 bytes
Total requirements:  16844 bytes

1 Warning.
Done.
[Finished in 0.3s]


iceeedr 09-18-2019 13:29

Re: cs_get_user_team
 
PHP Code:

new CsTeams:team cs_get_user_team(id

But why not make the direct switch in function?

PHP Code:

switch(cs_get_user_team(id)) 


LearninG 09-18-2019 14:45

Re: cs_get_user_team
 
ok , thanks.
Quote:

Originally Posted by iceeedr (Post 2667474)
But why not make the direct switch in function?

PHP Code:

switch(cs_get_user_team(id)) 


sure it's better , but my main point was on tag mismatch warning.


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

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