onspey Posted April 25, 2019 Share Posted April 25, 2019 I know there is no way to avoid having to deal with scripts bound to ActiveMagicEffects getting orphaned while still running. But is there a way to catch this situation from within the orphaned script itself? I tried testing for Self == None, but that doesn't seem do it. The scripts getting orphaned in itself is not a problem. I'm basically simply looking for a way to prevent the error message from getting thrown into the log file and confusing the casual modders. Anyone know how? Link to comment Share on other sites More sharing options...
Reneer Posted April 25, 2019 Share Posted April 25, 2019 No, I don't think there is any way to prevent the errors from showing up in the Papyrus log. Link to comment Share on other sites More sharing options...
onspey Posted April 26, 2019 Author Share Posted April 26, 2019 No, I don't think there is any way to prevent the errors from showing up in the Papyrus log.Thanks, Reneer. I assumed as much, looking at all the otherwise well-made mods that generate lots of these messages. Link to comment Share on other sites More sharing options...
onspey Posted March 12, 2022 Author Share Posted March 12, 2022 (edited) There seems to be a way after all. While you can't test Self == None, you can cast Self to a string and look for a sub-string '<None>', like so: If StringUtil.Find(Self As String, "<None>") < 0 Then ; Code that would throw 'No object bound' error, if script is no longer attached EndIfAt least this is how I currently deal with this issue. Edited March 12, 2022 by onspey Link to comment Share on other sites More sharing options...
Recommended Posts