sourcepawn icon indicating copy to clipboard operation
sourcepawn copied to clipboard

Add static property support for methodmaps.

Open GAMMACASE opened this issue 7 years ago • 3 comments

Add static property support for methodmaps;

Example:

int g_val;

methodmap Test
{
	property static int TestVal
	{
		public get() { return g_val; }
		public set(int v) { g_val = v; }
	}
}

... //Later in code

Test.TestVal = 1;

GAMMACASE avatar Sep 24 '18 09:09 GAMMACASE

I would also love to see this. My usecase is alliedmodders/sourcemod#1875

kinsi55 avatar Dec 07 '22 21:12 kinsi55

I can't really think of a good reason to say "no" to this. I'm guessing enum structs should have it too.

dvander avatar Dec 08 '22 04:12 dvander