BasicPawn icon indicating copy to clipboard operation
BasicPawn copied to clipboard

BasicPawn own's internal #include

Open dragokas opened this issue 2 years ago • 2 comments
trafficstars

Does BasicPawn has own service #include to know that the code is being compiled by this specific compiler?

Well, you may I ask why... I'd like to make some code (like Left 4 DHooks Direct) be compatible with BasicPawn (in sense of the latest SM version supported by BP) without breaking original code style.

E.g.:

enum L4D2WeaponId
{
	...
	#if defined BasicPawn
		L4D2WeaponId_Max
	#endif
}

#if defined BasicPawn
static const char L4D2WeaponWorldModel[L4D2WeaponId][] =
#else
static const char L4D2WeaponWorldModel[L4D2WeaponId_Max][] =
#endif
{
	...
}

Some language features used above are only supported by the newest SM.

dragokas avatar Aug 05 '23 11:08 dragokas

No there is no BasicPawn include nor define. The syntax doesnt seem to have changed since i last time used it? So BasicPawn should still work with new compilers, you just cant compile them sadly.

I will get back to BasicPawn and fix this issue eventually. Currently i have been working on another big project and havent touched BasicPawn in a while. That doesnt mean its dead tho.

You can use DosMike's fork that made a workaround for this issue. https://github.com/DosMike/BasicPawn

Timocop avatar Aug 05 '23 19:08 Timocop

Did you try to define BasicPawn=1 in this line? Works for me. изображение

MAGNAT2645 avatar Aug 05 '23 21:08 MAGNAT2645