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

Compile warning?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BoBzY
AlliedModders Donor
Join Date: Aug 2010
Location: Bruxelles
Old 02-25-2011 , 19:11   Compile warning?
Reply With Quote #1

Code:
if (var1 == caller || var2 == caller)

ms.sp(146) : warning 213: tag mismatch
ms.sp(146) : warning 213: tag mismatch

any idea oO?

ty
BoBzY is offline
McFlurry
Veteran Member
Join Date: Mar 2010
Location: RemoveEdict(0);
Old 02-25-2011 , 19:25   Re: Compile warning?
Reply With Quote #2

var1 and var2 do not match the same type as caller, they must both be integers or floats if you are using an == statement on them.
__________________
McFlurry is offline
Send a message via Skype™ to McFlurry
BoBzY
AlliedModders Donor
Join Date: Aug 2010
Location: Bruxelles
Old 02-25-2011 , 19:32   Re: Compile warning?
Reply With Quote #3

Both, you mean var1 and caller for example?
BoBzY is offline
psychonic

BAFFLED
Join Date: May 2008
Old 02-25-2011 , 19:33   Re: Compile warning?
Reply With Quote #4

Quote:
Originally Posted by BoBzY View Post
Both, you mean var1 and caller for example?
Post the actual code.
psychonic is offline
BoBzY
AlliedModders Donor
Join Date: Aug 2010
Location: Bruxelles
Old 02-25-2011 , 19:42   Re: Compile warning?
Reply With Quote #5

Code:
new int:var1, int var2;
new Float:entorigin[3];


public Check(const String:output[], caller, activator, Float:delay)
{
	if (var1 == caller || var2 == caller)
	{
		//stuff
	}
}

public Action:GetEntId(Handle:timer)
{
	new entindex=-1;
	while ((entindex = FindEntityByClassname(entindex, "func_button")) != -1)
	{
		GetEntPropVector(entindex, Prop_Send, "m_vecOrigin", entorigin);
		if (-50.5 == entorigin[0])
		{
			GetEntPropVector(entindex, Prop_Send, "m_vecOrigin", entorigine);
			var1 = entindex;
			HookSingleEntityOutput(entindex, "OnIn", Check);
		}
		if (-50.8 == entorigin[0])
		{
			GetEntPropVector(entindex, Prop_Send, "m_vecOrigin", entorigine);
			var2 = entindex;
			HookSingleEntityOutput(entindex, "OnIn", Check);
		}
	}
}
Code is too long, this may help ya? =)
BoBzY is offline
psychonic

BAFFLED
Join Date: May 2008
Old 02-25-2011 , 19:49   Re: Compile warning?
Reply With Quote #6

There is no 'int' tag. Leave integer values untagged.
psychonic is offline
BoBzY
AlliedModders Donor
Join Date: Aug 2010
Location: Bruxelles
Old 02-25-2011 , 19:51   Re: Compile warning?
Reply With Quote #7

LOL it works, thanks dude :wub:

Another warn I dont understand :

Code:
public Action:Event_OnRoundEnd(Handle:event, const String:name[], bool:dontBroadcast)
{
	if (entorigine[0] > -1)
	{
		UnhookSingleEntityOutput(entorigine[0], "OnIn", OnPress);
	}
}

warning 213: tag mismatch

any idea :s?

Last edited by BoBzY; 02-25-2011 at 19:54.
BoBzY is offline
Kevin_b_er
SourceMod Donor
Join Date: Feb 2009
Old 02-26-2011 , 01:18   Re: Compile warning?
Reply With Quote #8

entorigine[0] is not a basic integer or OnPress does not match the prototype of an EntityOutput.
__________________
Kevin_b_er is offline
BoBzY
AlliedModders Donor
Join Date: Aug 2010
Location: Bruxelles
Old 02-26-2011 , 06:31   Re: Compile warning?
Reply With Quote #9

I see, thanks you very much
BoBzY 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 10:48.


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