Raised This Month: $ Target: $400
 0% 

[help] tag mismatch


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
EDUTz
Senior Member
Join Date: Jun 2010
Location: Dracula's Homeland
Old 05-10-2014 , 14:37   [help] tag mismatch
Reply With Quote #1

How can i get arround this tag mismatch warning ?

Code:
message_begin(MSG_BROADCAST, g_msgScoreInfo)
write_byte(attacker) // id
write_short(pev(attacker, pev_frags)) // frags
write_short(cs_get_user_deaths(attacker)) // deaths
write_short(0) // class?
write_short(getuserteam(attacker)) // team <------ here's the warning
message_end()

stock CsTeams:getuserteam(id)
{
	if (pev_valid(id) != PDATA_SAFE)
	return CsTeams:CS_TEAM_UNASSIGNED;
	return CsTeams:get_pdata_int(id, OFFSET_CSTEAMS, OFFSET_LINUX);
}
even if i remove the "CsTeams:" part, i get tag mismatch on returning team_unassigned
EDUTz is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 05-10-2014 , 14:53   Re: [help] tag mismatch
Reply With Quote #2

PHP Code:
write_short(getuserteam(attacker)) 
Function getuserteam(id) will return CsTeams: tag, and write_short() wants no tag, so detagging it would be a proper solution, like so:
PHP Code:
write_short(_:getuserteam(attacker)) 
klippy is offline
EDUTz
Senior Member
Join Date: Jun 2010
Location: Dracula's Homeland
Old 05-10-2014 , 15:09   Re: [help] tag mismatch
Reply With Quote #3

holly s**t ! thanks.
t.c.
EDUTz 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 20:32.


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