ePath Posted January 22, 2021 Share Posted January 22, 2021 (edited) Hi! Say I have 3 lines of code (not necessarily valid, just an example I made here on the fly): LLRemoveForm WeaponList Rifle LLRemoveForm WeaponList Pistol LLRemoveForm WeaponList Shotgun BUT there's no "Pistol" inside "WeaponList" only "Rifle"and "Shotgun". Will my script burn and die and stop right there? or would it just continue and remove "Shotgun" from the list? Also, assume that that script is an UDF, lets say it's "RemoveUDF", which is called inside a script such as: call AddUDF call RemoveUDF call ExecuteUDF In the case that "RemoveUDF" does stop working, would it stop the script where it is called too? or just continue and run "call ExecuteUDF" line? Edited January 22, 2021 by ePath Link to comment Share on other sites More sharing options...
ashtonlp101 Posted January 22, 2021 Share Posted January 22, 2021 I would just run a check to see if the list has each item inside the form before removing it from the list, using the IsInList function. It could potentially crash the game? Forms lists are already kind of wonky as is, so I'd run a check just to be safe. Link to comment Share on other sites More sharing options...
ePath Posted January 22, 2021 Author Share Posted January 22, 2021 (edited) I would just run a check to see if the list has each item inside the form before removing it from the list, using the IsInList function. It could potentially crash the game? Forms lists are already kind of wonky as is, so I'd run a check just to be safe. I've been reluctant to use IsInList since one of my mod's scripts has a TON of Removes and didn't know if it would be efficient and never caused any problem, although it does run only once per game session so maybe it wouldn't be a big deal?... Edited January 22, 2021 by ePath Link to comment Share on other sites More sharing options...
dubiousintent Posted January 24, 2021 Share Posted January 24, 2021 If a script only runs once per session, then it isn't going to have a noticeable impact on the game. If it's in a "OnGameLoad" block, it will get buried in the other "loading" delays anyway. -Dubious- Link to comment Share on other sites More sharing options...
Recommended Posts