API version issue

Started by Revenger12, Dec 16, 2018, 06:38 PM

Previous topic - Next topic

Revenger12

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

NicusorN5

Use the latest VCMP SDK.

Revenger12


Revenger12

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;