wysiwyg Posted September 12, 2012 Share Posted September 12, 2012 So if a script is running when you save a game and you try to replace the script Skyrim will use the original version from the save until the script exits, right?. What if it never exits because of an error or was written badly enough to always run and you can't stop it without updating it? If this happen will it create a situation where you can't update the running copy because it's still running and will always use the version from the save game? Is there a way for force a running script to quit in the console? Specifically, this old chestnut: [09/12/2012 - 03:10:52PM] error: Object reference has no 3Dstack: [ (0001E68C)].Sound.Play() - "<native>" Line ? [ (000621D5)].fxDustDropRandomSCRIPT.OnLoad() - "<savegame>" Line ? Well, I can fix the script but it never unloads because it doesn't seem unload the script after the error and just runs it again. The original looks like this and sure. I could easily fix the script if I could get Skyrim to use the changed code in locations I already visited. It looks the script doesn't end after onLoad ends possibly because the statement with the error occurred after a timer. OnUnload never seems to get executed. Even if I replace OnLoad and OnUnload with OnCellAttach/OnUpdate/OnCellDetach the game keeps executing the old OnLoad forever every 10 seconds or so in the locations where it was originally run. It's not just this script but in general I'd like to know if there is a way to forcibly unload a script and use a new version. event onLoad() on = true while on == true chooser = RandomInt(1,3) rndWaitTimer = RandomFloat(10.0, 30.0) wait(rndWaitTimer) if chooser == 1 self.PlayAnimation("PlayAnim01") mySFX.play(self) wait(0.5) placeAtMe(FallingDustExplosion01) wait(3) self.PlayAnimation("PlayAnim02") elseif chooser == 2 self.PlayAnimation("PlayAnim02") mySFX.play(self) elseif chooser == 3 self.PlayAnimation("PlayAnim03") mySFX.play(self) endif endWhile endEvent Link to comment Share on other sites More sharing options...
Cipscis Posted September 12, 2012 Share Posted September 12, 2012 The wiki has some documentation on this you might find useful - Save File Notes (Papyrus) Cipscis Link to comment Share on other sites More sharing options...
wysiwyg Posted September 13, 2012 Author Share Posted September 13, 2012 I read the wiki sections. The questions I have are regarding ending repeating scripts that stay running so that the version from the save file is always used. Link to comment Share on other sites More sharing options...
DreamKingMods Posted September 13, 2012 Share Posted September 13, 2012 You could try the ReloadScript console command. Link to comment Share on other sites More sharing options...
wysiwyg Posted September 13, 2012 Author Share Posted September 13, 2012 You could try the ReloadScript console command. Thanks! I missed that one. I'll give it a try and hopefully that will force a reload. Link to comment Share on other sites More sharing options...
Recommended Posts