YSI: redifinition of constant/macro
#1

So, basically i tried to include y_timers then i got those warning after trying to compile.
Код HTML:
C:\Users\Kampot\Desktop\SAMP\pawno\include\YSI_Coding\..\YSI_Data\y_foreach/iterators.inc(760) : warning 201: redefinition of constant/macro (symbol "CreateVehicle")
C:\Users\Kampot\Desktop\SAMP\pawno\include\YSI_Coding\..\YSI_Data\y_foreach/iterators.inc(778) : warning 201: redefinition of constant/macro (symbol "AddStaticVehicle")
C:\Users\Kampot\Desktop\SAMP\pawno\include\YSI_Coding\..\YSI_Data\y_foreach/iterators.inc(802) : warning 201: redefinition of constant/macro (symbol "AddStaticVehicleEx")
C:\Users\Kampot\Desktop\SAMP\pawno\include\YSI_Coding\..\YSI_Data\y_foreach/iterators.inc(818) : warning 201: redefinition of constant/macro (symbol "DestroyVehicle")
These are the lines that are causing the problem:
Код HTML:
	#if defined _ALS_CreateVehicle
		#undef CreateVehicle
	#else
		#define _ALS_CreateVehicle
	#endif
	#define CreateVehicle Iter_CreateVehicle
Код HTML:
	#if defined _ALS_AddStaticVehicle
		#undef AddStaticVehicle
	#else
		#define _ALS_AddStaticVehicle
	#endif
	#define AddStaticVehicle Iter_AddStaticVehicle
Код HTML:
	#if defined _ALS_AddStaticVehicleEx
		#undef AddStaticVehicleEx
	#else
		#define _ALS_AddStaticVehicleEx
	#endif
	#define AddStaticVehicleEx Iter_AddStaticVehicleEx
Код HTML:
	#if defined _ALS_AddStaticVehicleEx
		#undef AddStaticVehicleEx
	#else
		#define _ALS_AddStaticVehicleEx
	#endif
	#define AddStaticVehicleEx Iter_AddStaticVehicleEx
So, how can i fix this?
Reply
#2

YSI hooks the function correctly so the problem is in another include that defines these four vehicle functions and just reports the first include found. I've seen many complains about those includes that get vehicle color that never used hooks and take a look here: https://sampforum.blast.hk/showthread.php?tid=570910
Reply
#3

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
YSI hooks the function correctly so the problem is in another include that defines these four vehicle functions and just reports the first include found. I've seen many complains about those includes that get vehicle color that never used hooks and take a look here: https://sampforum.blast.hk/showthread.php?tid=570910
Thanks, i found the source of the problem, it was an include that i didn't even use.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)