GetPluginVersion - F4SE

From Creation Kit
Jump to: navigation, search

F4SE Member of: F4SE Script
Requires F4SE version 0.2.0 or higher.

Gets the version of any currently installed F4SE plugin.

Syntax

int Function GetPluginVersion(string name) Global Native

Parameters

  • name: The name of an F4SE plugin to query.

Return Value

The F4SE plugin's version, or -1 if it isn't loaded.

Examples

string sPluginName = "MyPlugin" const
int iPlugin = F4SE.GetPluginVersion(sPluginName)
Debug.Notification("F4SE plugin '" + sPluginName + "' version: " + iPlugin)
If (F4SE.GetPluginVersion("MyPlugin") == -1)
    Debug.Messagebox("MyPlugin is missing, please reinstall the mod and try again!")
EndIf

Notes

None

See Also