I'm trying to change the player's frags and deaths on the scoreboard, and I'm getting a tag mismatch warning for the team variable.
PHP Code:
new player, frags, deaths, CsTeams:team
player = 1 /* this will be the client id */
frags = 10
deaths = 5
team = cs_get_user_team(player)
set_user_frags(player, frags)
cs_set_user_deaths(player, deaths)
message_begin(MSG_ALL, get_user_msgid("ScoreInfo"))
write_byte(player)
write_short(frags)
write_short(deaths)
write_short(0)
write_short(team)
message_end()
From what I can tell, write_short() needs an integer, but team variable has tag "CsTeams".
I know I can fix this in one of two ways:
- Use get_user_team() instead of cs_get_user_team(), but I've read this is unreliable in certain situations.
- Detag team like so:
Code:
write_short(_:team)
but isn't this bad practice?
What should I do?