Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: Revenger12 on Dec 16, 2018, 06:38 PM

Title: API version issue
Post by: Revenger12 on Dec 16, 2018, 06:38 PM
Hello guys,
i know c++ and i wish to create a script for my server in c++ i checked plugins and there was a template(https://forum.vc-mp.org/?topic=1696.0) when i compiled it failed to load
Error: plugin is for incompatible API version 0.0 (current is 2.0)

can you guys help out with this what should i do to sort it out
Title: Re: API version issue
Post by: NicusorN5 on Dec 16, 2018, 06:41 PM
Use the latest VCMP SDK.
Title: Re: API version issue
Post by: Revenger12 on Dec 17, 2018, 11:21 AM
Same error just wondering why since i updated to new sdk also
The SDK i used: https://bitbucket.org/stormeus/0.4-squirrel/src/91e0bda6731bef5b2a826bf85c712efc27e9f170/VCMP.h?at=newapi
Title: Re: API version issue
Post by: Revenger12 on Dec 17, 2018, 01:48 PM
big thanks to @jWeb my problem solved and thank you @Athanatos
Quote from: jWeb on Feb 25, 2017, 10:50 PMSorry for the bump. But after the last updates, people that create plugins must also include the SDK version for which their plugin was compiled. Otherwise the server will reject your plugin.

To do that, you should add have this somewhere before you return out of the `VcmpPluginInit()` function:
pluginInfo->apiMajorVersion = PLUGIN_API_MAJOR;
 pluginInfo->apiMinorVersion = PLUGIN_API_MINOR;