CheeseshireCat wrote...
What is the "Too Many Instructions" error threshold, by the by? I had it happen on a loop of less than ten objects, which was just replacing with them different ones and transferrign two properties over.
Taken from an old post of mine on the old bioboards, with minor edits:
The guideline for this is called the 20K rule, because
in hexadecimal the limit is 0x020000 bytecode instructions. This
translates to 131,072 instructions. While I've never seen the exact
counts for instructions per function, you can assume that each function
uses AT LEAST one, probably more, bytecode instructions. This is another
arbitrarily set limit, put in place to prevent incorrectly written
scripts from endlessly looping. This is simply
what Bioware chose arbitrarily, and not any sort of indication what is
wise - though of course, you still shouldn't use more instructions than
necessary to accomplish your goal. There are a couple of ways to get
around this error, as well. The common scripted ways are to execute the
code using AssignCommand, DelayCommand, or in another event, with
SignalEvent. Or, you can simply raise the limit temporarily or
permanently with the nwnx_tmi plugin (written by acaos), which is my
preferred method, now, since it involves less hassle. The scripted
methods force an unnatural compartmentalization of scripts that would be
easier to read and work with whole.
Funky