Jump to content

Is there a clever way to check for skse?


tox2ik

Recommended Posts

I want certain parts of my script not to fail even if SKSE is not installed. Is there a safe and easy way to check if it is installed? What about using import? If I say import StringUtil, but the script is not actually there on the target system. Is there a way to prevent the whole script from crashing in this scenario?
Link to comment
Share on other sites

You can try something like this:

 

Bool Function GetSKSEInstalled()
bool installed = false
if (SKSE.GetVersion())
	;if your script made it to here, SKSE is installed
	;otherwise, it would throw an error in the script log
	;and the if condition would have failed
	installed = true
endif
return installed
EndFunction

Edited by fg109
Link to comment
Share on other sites

That's "calling a method on an unknown script" on a system where skse is not installed.

One would think they'd at least throw in a global named SKSEVERSION or somehting.

Edited by tox2ik
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...