Raised This Month: $ Target: $400
 0% 

[xtrafun.inc] Symbol already defined, if used with vexd include


  
 
 
Thread Tools Display Modes
Author Message
vittu
SuperHero Moderator
Join Date: Oct 2004
Location: L.A. County, CA
Old 12-09-2006 , 01:02   [xtrafun.inc] Symbol already defined, if used with vexd include
#1

The compile error:
Code:
// J:\scripting\include\\amxmod_compat\xtrafun.inc(87) : error 025: function heading differs from prototype
// J:\scripting\include\\amxmod_compat\xtrafun.inc(87) : error 021: symbol already defined: "find_entity"
The problem:
xtrafun.inc will get a compile error if a plugin also includes Vexd_Utilities.inc, normally something that old would not use VexdUM.inc. But because Vexd_Utilities.inc now includes VexdUM.inc as of amxmodx 1.76b, it defines the stock find_entity in VexdUM_stock.inc which is also in xtrafun.inc.


This can be fixed in xtrafun.inc by checking if vexdum is used as shown in bold below:
Code:
#if !defined _vexd_bcompat_included
/* Find an entity ID from start_from_ent id (use 0 to start from
 * the beginning, category is either "classname", "target" or
 * "targetname", value is the name you are searching for */
stock find_entity(start_from_ent, category, value[]) {
	switch (category) {
		case target: return find_ent_by_target(start_from_ent, value)
		case targetname: return find_ent_by_tname(start_from_ent, value)
	}
	return find_ent_by_class(start_from_ent, value)
}
#endif


Also just wanted to point out it shows \\ in "include\\amxmod_compat", though that doesn't effect anything.
vittu is offline
Send a message via AIM to vittu Send a message via MSN to vittu Send a message via Yahoo to vittu
BAILOPAN
Join Date: Jan 2004
Old 12-18-2006 , 21:03   Re: [xtrafun.inc] Symbol already defined, if used with vexd include
#2

Thanks for the report. This is fixed as revision 3175.
__________________
egg
BAILOPAN is offline
 



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 11:25.


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