Raised This Month: $32 Target: $400
 8% 

Tag mismatch


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
papel
Junior Member
Join Date: Jul 2017
Old 08-14-2020 , 16:28   Tag mismatch
Reply With Quote #1

Hi, everyone!
I have warning in the bold section. Can anyone help me remove this Tag mismatch?

Code:
decl String:sWeapon[64];
				GetEventString(event, "weapon", sWeapon, sizeof(sWeapon));
								
				decl bool:sHead;
				int headShotPoint = 0;
				sHead = GetEventInt(event, "headshot"); 

				if (sHead) { headShotPoint = HEAD_SHOT_POINT; }
Thank you all

Last edited by papel; 08-14-2020 at 16:31.
papel is offline
Weetabix
Member
Join Date: Feb 2017
Location: United Kingdom
Old 08-14-2020 , 16:36   Re: Tag mismatch
Reply With Quote #2

change bool to and int. It can be used the same as a bool in this instance.
Weetabix is offline
papel
Junior Member
Join Date: Jul 2017
Old 08-14-2020 , 17:19   Re: Tag mismatch
Reply With Quote #3

Thank you, Weetabix!
But it did not work
The amount of tag mismatch has increased

Code:
public Action:Event_player_death(Handle:event, const String:name[], bool:dontBroadcast) {

	if(!roundend) {
		new client = GetClientOfUserId(GetEventInt(event, "userid"));			
		new attacker = GetClientOfUserId(GetEventInt(event, "attacker"));
		
		if(client!=0 && attacker!=0) {
			if(!IsFakeClient(client)&&!IsFakeClient(attacker)&&client!=attacker) {

				decl String:sWeapon[64];
				GetEventString(event, "weapon", sWeapon, sizeof(sWeapon));
								
				decl int:sHead; 
				int headShotPoint = 0;
				sHead = GetEventInt(event, "headshot");

				if (sHead) { headShotPoint = HEAD_SHOT_POINT; }
papel is offline
Cruze
Veteran Member
Join Date: May 2017
Old 08-15-2020 , 01:29   Re: Tag mismatch
Reply With Quote #4

Use new bool:sHead or just simply bool sHead
__________________
Taking paid private requests! Contact me
Cruze is offline
Kellan123
AlliedModders Donor
Join Date: Aug 2012
Old 08-15-2020 , 04:10   Re: Tag mismatch
Reply With Quote #5

Quote:
Originally Posted by papel View Post
Thank you, Weetabix!
But it did not work
The amount of tag mismatch has increased

Code:
public Action:Event_player_death(Handle:event, const String:name[], bool:dontBroadcast) {

	if(!roundend) {
		new client = GetClientOfUserId(GetEventInt(event, "userid"));			
		new attacker = GetClientOfUserId(GetEventInt(event, "attacker"));
		
		if(client!=0 && attacker!=0) {
			if(!IsFakeClient(client)&&!IsFakeClient(attacker)&&client!=attacker) {

				decl String:sWeapon[64];
				GetEventString(event, "weapon", sWeapon, sizeof(sWeapon));
								
				decl int:sHead; 
				int headShotPoint = 0;
				sHead = GetEventInt(event, "headshot");

				if (sHead) { headShotPoint = HEAD_SHOT_POINT; }
PHP Code:
decl int:sHead
>
PHP Code:
int sHead
(GetEventInt)
Kellan123 is offline
papel
Junior Member
Join Date: Jul 2017
Old 08-15-2020 , 07:01   Re: Tag mismatch
Reply With Quote #6

You guys are awesome. Thank you!
Replacing the bool with the int was generating new tags mismatchs. It was then that I decided to change GetEventInt to GetEventBool and at first it worked. I will do another test in the game.

Code:
sHead = GetEventBool(event, "headshot");

Last edited by papel; 08-15-2020 at 07:26.
papel 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 16:53.


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