EnaiSiaion Posted December 13, 2012 Share Posted December 13, 2012 (edited) ...bleh.The associated quest is gone, the objects are gone, but the script doesn't want to stop itself because it doesn't know what "itself" is. Deleting the quest was one step too far.And now I'm stuck with a script in my save file that is spamming errors every five seconds. :confused: [12/13/2012 - 10:37:23PM] APOCALYPSE DEBUG: Vendor Restock Watchdog script detected that its kill switch is not enabled - stopping associated quest. [12/13/2012 - 10:37:23PM] error: Unable to call UnregisterForUpdate - no native object bound to the script object, or object is of incorrect type stack: [<NULL form> (0205A655)].Apoc_AutomaticQuestScript.UnregisterForUpdate() - "<native>" Line ? [<NULL form> (0205A655)].Apoc_AutomaticQuestScript.OnUpdate() - "Apoc_AutomaticQuestScript.psc" Line 147 [12/13/2012 - 10:37:23PM] error: Unable to call CompleteQuest - no native object bound to the script object, or object is of incorrect type stack: [<NULL form> (0205A655)].Apoc_AutomaticQuestScript.CompleteQuest() - "<native>" Line ? [<NULL form> (0205A655)].Apoc_AutomaticQuestScript.OnUpdate() - "Apoc_AutomaticQuestScript.psc" Line 148 [12/13/2012 - 10:37:23PM] error: Unable to call Stop - no native object bound to the script object, or object is of incorrect type stack: [<NULL form> (0205A655)].Apoc_AutomaticQuestScript.Stop() - "<native>" Line ? [<NULL form> (0205A655)].Apoc_AutomaticQuestScript.OnUpdate() - "Apoc_AutomaticQuestScript.psc" Line 149 Derp. :wallbash: It doesn't harm anything except it inflates the log files to a degree that almost matches Hearthfire and I don't like that. :verymad: Halp? Edited December 13, 2012 by EnaiSiaion Link to comment Share on other sites More sharing options...
steve40 Posted December 14, 2012 Share Posted December 14, 2012 It is never a good idea to delete forms from your mod if your save relies on them. As you have found, it will cause save bloat unless you start a new game.You will need to reload an earlier version of the mod that still has the quest and objects present, then cleanly uninstall the mod and make a clean savegame. Link to comment Share on other sites More sharing options...
EnaiSiaion Posted December 14, 2012 Author Share Posted December 14, 2012 It doesn't exactly add bloat, it just makes the existing bloat visible (and it is probably faster to error out than to actually do what the script did). Adding the quest back in would stop the errors but they would just resume when you uninstall the mod. With the common sense approach to turning off a script not working, how do you get rid of running scripts when the player uninstalls the mod? Link to comment Share on other sites More sharing options...
steve40 Posted December 16, 2012 Share Posted December 16, 2012 Have you tried deleting the loose pex fie from your scripts folder? That should go a long way towards stopping the log spam from that script. Link to comment Share on other sites More sharing options...
DreamKingMods Posted December 16, 2012 Share Posted December 16, 2012 On 12/14/2012 at 8:42 AM, EnaiSiaion said: It doesn't exactly add bloat, it just makes the existing bloat visible (and it is probably faster to error out than to actually do what the script did). Adding the quest back in would stop the errors but they would just resume when you uninstall the mod. With the common sense approach to turning off a script not working, how do you get rid of running scripts when the player uninstalls the mod? The best method is to never use RegisterForUpdate, but rather use RegisterForSingleUpdate and re-issue that registration at the end of your OnUpdate event. When a user uninstalls the mod, the OnUpdate block won't be found, so the registration won't be renewed and there won't be any errors spamming the log. What you could do is add an update quest in your next update with a script that unregisters your updates and then re-registers them as SingleUpdates. There are other solutions like a separate uninstall quest that you ask users to manually trigger in some way before they uninstall the mod, with a script attached that stops all your mod's other quests (stopping a quest cancels any event registrations associated with it). Or I've seen some modders have a separate downloadable package with empty script .pex files for users to install when they want to uninstall a mod, which may also prevent the updates from firing. Link to comment Share on other sites More sharing options...
EnaiSiaion Posted December 17, 2012 Author Share Posted December 17, 2012 On 12/16/2012 at 5:29 AM, steve40 said: Have you tried deleting the loose pex fie from your scripts folder? That should go a long way towards stopping the log spam from that script. Ooh! That works? :biggrin: On 12/16/2012 at 6:18 PM, DreamKingMods said: The best method is to never use RegisterForUpdate, but rather use RegisterForSingleUpdate and re-issue that registration at the end of your OnUpdate event. When a user uninstalls the mod, the OnUpdate block won't be found, so the registration won't be renewed and there won't be any errors spamming the log. But creationkit.com told me the opposite...I will file this feedback into the "eternal regrets" box. :sad: On 12/16/2012 at 6:18 PM, DreamKingMods said: What you could do is add an update quest in your next update with a script that unregisters your updates and then re-registers them as SingleUpdates. Can you do that? Can you make a script that unregisters another script? :blink: On 12/16/2012 at 6:18 PM, DreamKingMods said: There are other solutions like a separate uninstall quest that you ask users to manually trigger in some way before they uninstall the mod, with a script attached that stops all your mod's other quests (stopping a quest cancels any event registrations associated with it). Or I've seen some modders have a separate downloadable package with empty script .pex files for users to install when they want to uninstall a mod, which may also prevent the updates from firing. I don't like these solutions. Hell, I would prefer errors over a clunky solution such as this (not that I like errors, but...). Errors are invisible unless you look for them, but an uninstall script ruins immersion. I like the empty script solution and it won't even take a separate download, I can just replace the scripts with empty files and be done with it. Right? :) Thanks all! Link to comment Share on other sites More sharing options...
DreamKingMods Posted December 17, 2012 Share Posted December 17, 2012 On 12/17/2012 at 12:04 PM, EnaiSiaion said: On 12/16/2012 at 6:18 PM, DreamKingMods said: The best method is to never use RegisterForUpdate, but rather use RegisterForSingleUpdate and re-issue that registration at the end of your OnUpdate event. When a user uninstalls the mod, the OnUpdate block won't be found, so the registration won't be renewed and there won't be any errors spamming the log. But creationkit.com told me the opposite...I will file this feedback into the "eternal regrets" box. :sad: Not sure when you looked, but creationkit.com has since been updated--see the warning at the bottom of the RegisterForUpdate page. On 12/17/2012 at 12:04 PM, EnaiSiaion said: On 12/16/2012 at 6:18 PM, DreamKingMods said: What you could do is add an update quest in your next update with a script that unregisters your updates and then re-registers them as SingleUpdates.[Can you do that? Can you make a script that unregisters another script? :blink: Yep, just have the form with the registration as a property and then call FormProperty.UnregisterForUpdate() Link to comment Share on other sites More sharing options...
theimmersion Posted March 5, 2015 Share Posted March 5, 2015 (edited) Yep, just have the form with the registration as a property and then call FormProperty.UnregisterForUpdate()How does that work? I got a script that wont turn off. I tried this: SCRIPT ONEEvent OnUpdate()Debug.Notification("Didnt work")unregisterforevent()EndEvent And i got the "didnt work" notification over and over again. Also tried a new script like this in the same quest. SCRIPT TWOSCRIPT ONE Property KILL AutoEvent OnInit()Debug.Notification("Killing script")Kill.UnregisterForUpdate()EndEvent Get the "Killing script" notification once but still getting "Didint work" Notification. -.- Also made a new quest with the script two and script one is still working. Even when i turn of the plugin, the script one is still notifies me with "didnt work", like its trolling me. T.TPlease help!How do i disable the rogue script? A little more examples please? Edited March 5, 2015 by theimmersion Link to comment Share on other sites More sharing options...
cdcooley Posted March 5, 2015 Share Posted March 5, 2015 Try creating a loose version of the original script, replacing the old OnUpdate() function with Event OnUpdate() UnregisterForUpdate() EndEvent If that doesn't clear the registration, you're basically out of luck because you removed the original object before stopping the script updates. In that case your only hope is the SKSE feature to remove abandoned scripts or one of the save game cleaners. Link to comment Share on other sites More sharing options...
theimmersion Posted March 5, 2015 Share Posted March 5, 2015 What you mean by loose?Its not packed in any BSA Link to comment Share on other sites More sharing options...
Recommended Posts