SKSE Version Check Issue

Post » Tue Oct 21, 2014 7:01 am

So I have a script set up for my mod that should (theoretically) contain a global function that, when called, will set a few vars IF you have SKSE, and if you don't, pop up a messagebox informing you. Right now it's very simple, just if you have SKSE or not. I'll add the specific GetMinorVersion, etc. later. However, right now the popup shows EVERYTIME the player loads the game (I have an alias script calling this global function). I HAVE SKSE version 1.7.1, with the little notification in the bottom left corner of the menu and everything. So it's probably a scripting issue...

Script containing global function - has some extra stuff as well, on a control quest that is start game enabled

Spoiler
Scriptname IQControlQuestScript extends Quest  {Governs the globally used functions and properties for ImmersiveQuests.}GlobalVariable Property HasSKSE Auto {For use with quest conditions. Equal to SKtikstallCheck.}GlobalVariable Property PlayerWeight AutoEvent OnInit()	RegisterForSingleUpdate(0.1)EndEventEvent OnUpdate()	HasSKSE.SetValue(SKtikstallCheck())	If IQControlQuestScript.SKtikstallCheck()		;SKSE installed		PlayerWeight.SetValue(GetPCWeight())	Else 		Debug.MessageBox("You don't have SKSE installed. Parts of Immersive Quests will not work properly without it.")	EndIfEndEventInt Function SKtikstallCheck() Global 	Float SKSEVer = SKSE.GetVersion()	If SKSEVer > 0.00		;SKSE installed		Return 1	Else		;SKSE not installed		Return 0	EndIfEndFunctionFloat Function GetPCWeight() Global	Return Game.GetPlayer().GetActorBase().GetWeight()EndFunctionFunction FailAllObjectivesixcept(Quest kQuest, Int Exception, Int HighestObj) Global      Int Counter = 0      While (Counter < HighestObj)          If (Counter != Exception)               kQuest.SetObjectiveCompleted(Counter, false)          EndIf           Counter += 1	EndWhileEndFunction

Player alias script - on the same script:

Spoiler
Scriptname IQControlPlayerAlias extends ReferenceAlias  {Does stuff when the player loads the game.}GlobalVariable Property HasSKSE Auto {For use with quest conditions. Equal to SKtikstallCheck.}Event OnPlayerLoadGame()	HasSKSE.SetValue(IQControlQuestScript.SKtikstallCheck())	If HasSKSE.Value =http://forums.bethsoft.com/topic/1509171-skse-version-check-issue/= 0		;SKSE installed	Else 		Debug.MessageBox("You don't have SKSE installed. Parts of Immersive Quests will not work properly without it.")	EndIfEndEvent

Also, I'll add a real message at some point not just the debug. For now, I'm just testing.

User avatar
SaVino GοΜ
 
Posts: 3360
Joined: Mon Sep 17, 2007 8:00 pm

Post » Tue Oct 21, 2014 9:15 am

Is the HasSKSE glob set to constant? IIRC you cannot change the value of a constant glob at all even though the ck wiki says its simply not saved.

User avatar
Hayley O'Gara
 
Posts: 3465
Joined: Wed Nov 22, 2006 2:53 am


Return to V - Skyrim