OnVersionUpdate does not trigger
Tjorriemorrie opened this issue · 4 comments
Tjorriemorrie commented
int function GetVersion()
return 3
endFunction
event OnVersionUpdate(int a_version)
{Called when a version update of this script has been detected}
OnConfigInit()
; Version 2 specific updating code
if (a_version >= 2 && CurrentVersion < 2)
Debug.MessageBox("test2")
endIf
if (a_version >= 3 && CurrentVersion < 3)
Debug.MessageBox("test3")
endIf
; ...
endEvent
I've had this on 1 and 2 and 3 but the messagebox never show. What am I doing wrong?
schlangster commented
Did you create the player alias for the script to make sure OnGameReload is called on reload? That's where OnVersionUpdate is triggered from.
Tjorriemorrie commented
Thanks, I can't fine OnGameReload, is that in the MCM API?
Tjorriemorrie commented
I've managed to attach SKI_PlayerLoadGameAlias to the PlayerReference, but when I did so, it said it could not find the psc. Is that normal?
Tjorriemorrie commented
It works as you explained, thanks