Jump to content

Invalid line of code (?)


ePath

Recommended Posts

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 by ePath
Link to comment
Share on other sites

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 by ePath
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...