Difference between revisions of "GetPluginVersion - F4SE"
Jump to navigation
Jump to search
imported>Qazaaq (Added F4SE member) |
imported>Qazaaq (added required f4se version) |
||
Line 1: | Line 1: | ||
'''F4SE Member of:''' [[F4SE Script]] | '''F4SE Member of:''' [[F4SE Script]] | ||
{{Template:Papyrus:RequiredF4SE|version=0.2.0}} | |||
Gets the version of any currently installed F4SE plugin. | |||
== Syntax == | == Syntax == | ||
Line 12: | Line 10: | ||
== Parameters == | == Parameters == | ||
*name: The name of an F4SE plugin. | *name: The name of an F4SE plugin to query. | ||
== Return Value == | == Return Value == | ||
The F4SE plugin version. | The F4SE plugin's version, or -1 if it isn't loaded. | ||
== Examples == | == Examples == | ||
Line 22: | Line 20: | ||
int iPlugin = F4SE.GetPluginVersion(sPluginName) | int iPlugin = F4SE.GetPluginVersion(sPluginName) | ||
Debug.Notification("F4SE plugin '" + sPluginName + "' version: " + iPlugin) | Debug.Notification("F4SE plugin '" + sPluginName + "' version: " + iPlugin) | ||
</source> | |||
<source lang="papyrus"> | |||
If (F4SE.GetPluginVersion("MyPlugin") == -1) | |||
Debug.Messagebox("MyPlugin is missing, please reinstall the mod and try again!") | |||
EndIf | |||
</source> | </source> | ||
== Notes == | == Notes == | ||
None | |||
== See Also == | == See Also == | ||
Line 34: | Line 38: | ||
*[[GetVersionRelease - F4SE]] | *[[GetVersionRelease - F4SE]] | ||
*[[GetScriptVersionRelease - F4SE]] | *[[GetScriptVersionRelease - F4SE]] | ||
[[Category:Scripting]] | |||
[[Category:Papyrus]] | |||
[[Category:F4SE]] | |||
[[Category:Non-Delayed Native Functions]] |
Latest revision as of 14:12, 21 January 2018
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