Raised This Month: $51 Target: $400
 12% 

Another "tag mismatch" warning


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GlobalPlague
Senior Member
Join Date: Feb 2016
Location: Pluto
Old 12-04-2021 , 05:08   Another "tag mismatch" warning
Reply With Quote #1

Hello. I introduced some changes to a plugin, and now when I try to compile it, the compiler shows the following warning:

"C:\Mod\cstrike\addons\amxmodx\scripting\zomb ie_plague_advance_v1-6-1.sma(1379 : warning 213: tag mismatch"

This is the part of the code I edited, and line 13798 is marked in red:

Code:
public zombie_countdown()
{    
	new speak[ 10 ][] = { "fvox/zp_one.wav", "fvox/zp_two.wav", "fvox/zp_three.wav", "fvox/zp_four.wav", "fvox/zp_five.wav", "fvox/zp_six.wav", "fvox/zp_seven.wav", "fvox/zp_eight.wav", "fvox/zp_nine.wav", "fvox/zp_ten.wav" }
	
	emit_sound( 0, CHAN_VOICE, speak[ countdown ], 1.0, ATTN_NORM, 0, PITCH_NORM )
	countdown--
	
	set_dhudmessage(0, 0, 255, -1.0, 0.28, 2, 0.02, 1.0, 0.01, 0.1, 10);
	show_dhudmessage(0, "Infection in %i", time_s); 
	--time_s;
	
	if(time_s >= 1)
	{
		set_task(1.0, "zombie_countdown")
	}
}
The warning means I have to delete a number from that line, but I don't know which number I need to delete. Usually, after I replace HUD with DHUD, i need to delete the "-1" value that i often see at the end of the line, but this time the code is different and i don't know which number to delete.

Would you help me?

Also, it would be good if someone explains to me what exactly "tag mismatch" means, so I can learn how to fix such type of warnings by myself.

Thanks.

Last edited by GlobalPlague; 12-04-2021 at 05:15.
GlobalPlague is offline
thEsp
BANNED
Join Date: Aug 2017
Old 12-04-2021 , 05:10  
Reply With Quote #2

Code:
set_dhudmessage(0, 0, 255, -1.0, 0.28, 2, 0.02, 1.0, 0.01, 0.1, 10.0);

Last edited by asherkin; 12-04-2021 at 07:18.
thEsp is offline
GlobalPlague
Senior Member
Join Date: Feb 2016
Location: Pluto
Old 12-04-2021 , 05:23   Re: Another "tag mismatch" warning
Reply With Quote #3

Quote:
Originally Posted by thEsp View Post
Code:
set_dhudmessage(0, 0, 255, -1.0, 0.28, 2, 0.02, 1.0, 0.01, 0.1, 10.0);
Adding ".0" after the "10" at the end of the line, didn't solve the problem. I still get the same warning.

Last edited by asherkin; 12-04-2021 at 07:19.
GlobalPlague is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 12-04-2021 , 06:54   Re: Another "tag mismatch" warning
Reply With Quote #4

I see 11 arguments where there should be 10.
The ,10 sticks out. What is this ,10 supposed to do?

Study this.
https://www.amxmodx.org/api/amxmodx/set_dhudmessage
Code:
native set_dhudmessage(red = 200, green = 100, blue = 0, Float:x = -1.0, Float:y = 0.35, effects = 0, Float:fxtime = 6.0, Float:holdtime = 12.0, Float:fadeintime = 0.1, Float:fadeouttime = 0.2);
__________________

Last edited by DJEarthQuake; 12-04-2021 at 06:58.
DJEarthQuake is offline
GlobalPlague
Senior Member
Join Date: Feb 2016
Location: Pluto
Old 12-04-2021 , 07:28   Re: Another "tag mismatch" warning
Reply With Quote #5

Quote:
Originally Posted by DJEarthQuake View Post
I see 11 arguments where there should be 10.
The ,10 sticks out. What is this ,10 supposed to do?

Study this.
https://www.amxmodx.org/api/amxmodx/set_dhudmessage
Code:
native set_dhudmessage(red = 200, green = 100, blue = 0, Float:x = -1.0, Float:y = 0.35, effects = 0, Float:fxtime = 6.0, Float:holdtime = 12.0, Float:fadeintime = 0.1, Float:fadeouttime = 0.2);
What is this ,10 supposed to do?

The ",10" was there, in the default code of the plugin, before i changed HUD into DHUD.

Thanks for your help. The problem is solved.

Yeah, I have to learn how to deal with these arguments.
GlobalPlague is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 12-04-2021 , 09:05   Re: Another "tag mismatch" warning
Reply With Quote #6

You are welcome. Soft coding is technique for such. Instead of 'SzString of unmarked iNumbers' suddenly the code is personified. Mistakes are easier to spot.
__________________
DJEarthQuake is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-04-2021 , 14:24   Re: Another "tag mismatch" warning
Reply With Quote #7

Simply look at the function definition to see how many arguments and of what type you need.
__________________
fysiks is online now
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 01:52.


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