Maduin81 Posted May 3, 2016 Share Posted May 3, 2016 So while working on some scripting (I'm fairly new to Papyrus), I came across the issue that an old version of my script is still running. My Papyrus log shows the following - [None].<scriptname>.<Function Name> as well as[<RefID>].<scriptname>.<Function Name> I don't know if me renaming the file caused it or what, but apparently I have an orphaned script as part of my save and was wondering if there is any way to remove it via the current script? Link to comment Share on other sites More sharing options...
Reneer Posted May 3, 2016 Share Posted May 3, 2016 So while working on some scripting (I'm fairly new to Papyrus), I came across the issue that an old version of my script is still running. My Papyrus log shows the following - [None].<scriptname>.<Function Name> as well as[<RefID>].<scriptname>.<Function Name> I don't know if me renaming the file caused it or what, but apparently I have an orphaned script as part of my save and was wondering if there is any way to remove it via the current script? You will need to post the entire script. The game -should- be tossing out the old script if it no longer exists as a PEX file. Link to comment Share on other sites More sharing options...
DarthWayne Posted May 3, 2016 Share Posted May 3, 2016 You will need to post the entire script. The game -should- be tossing out the old script if it no longer exists as a PEX file.Are you sure? My experience is that they will continue throwing "script not found" errors until you start a new game lol. That was back in Skyrim though, but since then I never renamed a script again after I released the first version of the mod. Link to comment Share on other sites More sharing options...
Reneer Posted May 3, 2016 Share Posted May 3, 2016 (edited) You will need to post the entire script. The game -should- be tossing out the old script if it no longer exists as a PEX file.Are you sure? My experience is that they will continue throwing "script not found" errors until you start a new game lol. That was back in Skyrim though, but since then I never renamed a script again after I released the first version of the mod.As far as I understand it, Fallout 4 is a bit different from how Skyrim implemented scripts. Both, supposedly, would keep copies of variables and functions in the save-game if the function was in the middle of running when the game was saved. I mean, I would never recommend renaming a script after it has been used in your save-game for just this reason, but I did something similar where I created a wholly new script, detached the old script from the items in the CK, and added the new script to those items (the new script had an OnInit event where the old script did not). And I've never gotten the error that the OP is describing. It sounds like the game still thinks the renamed script is still attached to the in-game items and is trying to access it, but since the script was renamed, it obviously can't find it. Without seeing the ESP file and how the scripts are set up in there I can't say much more about it. As to the direct question the OP asked, there is no way I know of to remove a script from an in-game item through the use of another script. Edited May 3, 2016 by Reneer Link to comment Share on other sites More sharing options...
Maduin81 Posted May 12, 2016 Author Share Posted May 12, 2016 I forgot all about this topic, but what I ended up doing to clean it up without interfering with my currently running script (since they both had the same names so were trying to execute the same script) was initiate a shutdown on it if the form ID was null, this killed the old one while allowing the new one to continue. It resolved the issue with no further errors. Link to comment Share on other sites More sharing options...
Recommended Posts