GetPluginVersion - F4SE

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search

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

Gets the version of any currently installed F4SE plugin.

Syntax[edit | edit source]

int Function GetPluginVersion(string name) Global Native

Parameters[edit | edit source]

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

Return Value[edit | edit source]

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

Examples[edit | edit source]

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[edit | edit source]

None

See Also[edit | edit source]