• Hi Guest!

    We are extremely excited to announce the release of our first Beta for VaM2, the next generation of Virt-A-Mate which is currently in development.
    To participate in the Beta, a subscription to the Entertainer or Creator Tier is required. Once subscribed, download instructions can be found here.

    Click here for information and guides regarding the VaM2 beta. Join our Discord server for more announcements and community discussion about VaM2.

Avoiding newer APIs from breaking suppot for older VaM versions

Acid Bubbles

Invaluable member
Developer
Featured Contributor
Joined
May 11, 2020
Messages
1,403
Solutions
10
Reactions
5,809
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