Avoiding newer APIs from breaking suppot for older VaM versions

Acid Bubbles

Invaluable member
Developer
Featured Contributor
Messages
1,363
Reactions
5,469
Points
173
Website
github.com
Twitter
acidbubblesanon
Patreon
acidbubbles
When new APIs are released, like FileManagerSecure.CreateDirectory, everyone with slightly older versions get an error like this:
1593540392376.png

I have no way of preventing this error other than not using new APIs...
There is a fairly simple way to fix that though: provide precompiler directives.

Code:
// ...

#if(VAM_1_19_2)

// Code using those new APIs only available since then

#endif

// ...

You could add VAM_1_19 and VAM_1_19_2 for all releases where you added or changed public APIs (or always), so when VAM_1_20 is out, VAM_1_19 is still defined and will still work.

Otherwise for Timeline I won't be able to use anything new without breaking with errors people cannot understand...
 
Back
Top Bottom