Digging through my archives,

here's some info from an 'SFD 8 Addenda' thread I started a few years ago...
Note: I no longer have MW installed on my computer and haven't played the game or used the CS for a long time. I think this info is still good, but don't have any way of double-checking it.

----------------------------------------------------------------------------
According to SFD, the 'Equip' statement by itself will add an item to inventory and equip it, without needing a separate 'AddItem' statement. However, for the player character, it appears that this will only work _after_ at least one 'AddItem' has been used.
----------------------------------------------------------------------------
According to a post on the Bethesda forums, on the PC version an overflow loot bag will be created if there are more than 1024 objects in a single cell. I believe the number may be different for interior and exterior cells, but I couldn't find any more specifics in either the old or the new forums.
However, if you try to put a large number of objects into a cell using 'PlaceAtPC', the game will lockup completely. Don't know the minimum number that will cause the crash, but 'PlaceAtPC p_restore_health_e 2000 0 0' will definitely do it.

(Added today) In other words: the game engine won't create an overflow loot bag for excess items that are added to a cell by a script; instead, it just crashes when the maximum number of items per cell is exceeded. I ran into this with 'PlaceAtPC', but I would
guess that any script function that adds items to a cell would have the same problem. I would also guess that the crash occurs as soon as the number of items in the cell reaches the number that would normally trigger the creation of an overflow loot bag.
----------------------------------------------------------------------------
In the 'Operators' section in SFD 8, Ghan talks about limits on the maximum number of variables that can be used in a single 'Set' statement.
Here's what I came up with:
Eleven variables in a single set statement will cause the following error when loading the game, followed by a crash to desktop:
"Need more room for zero pointers in Script::ReplaceGlobalsInData"; as soon as you click the button to acknowledge the error, CTD. (That script name wasn't any script of mine; apparently it's something internal to the game.)
Six variables in a Set statement work fine. Don't know the maximum number, but it's obviously at least six and definitely less than eleven.
----------------------------------------------------------------------------
When you make changes to a script, it's a very good idea to save the script _twice_ afterwards, to make sure the compiler properly checks it for errors.
For example, if you delete a variable declaration but forget to remove the variable from the script, the compiler may not report an error the first time you save the script. This also happens when you change the name of a script (in the 'Begin' statement), but leave the original name in a StopScript statement.
Apparently, the compiler doesn't update its internal list of variables, script names, etc. until _after_ it compiles the script. End result is that the compiler will use the stored variable declarations and script names from its previous pass through the script, rather than the current ones.
This probably explains why you have to save a script at least once before its name (from the 'Begin' statement) will be recognized in a StopScript statement in the same script.
----------------------------------------------------------------------------
If you 'AddItem' to an NPC's inventory when the inventory screen is already open, the display won't be updated with the new items, unless
(EDIT) the player manually adds or removes displayed items (which forces the game to refresh the inventory display).
So using just a check for ( MenuMode == 1 ) to move items into an NPC's inventory will cause problems when the NPC is dead or unconscious.
(Added today) For example:
The early versions of my Potion Saver coded used 'If MenuMode == 1' to trigger putting potions back into the companion's inventory. This worked fine when the companion was alive and concious, since the script would add the potions while in the dialogue window,
before the companion share inventory window was opened.
However, if the companion was dead or unconscious, clicking on the companion would open the inventory window immediately, and the potions would be added after the window was already open. End result, the potions wouldn't show up in the inventory window.
To avoid the problem, add items to an NPC's inventory as soon as they die, as soon as they fall unconscious, or when the game goes into Menu Mode (check Menu Mode
after checking death and uncounciousness). That way, the items will be added before the inventory window opens.
Here's the code I used for this in the Potion Saver:
CODE
If ( GetHealth < 1 )
Set DTNPS_HandlePotions to 0
ElseIf ( GetFatigue < 1 )
Set DTNPS_HandlePotions to 0
ElseIf ( MenuMode == 1 )
Set DTNPS_HandlePotions to 0
Else
Set DTNPS_HandlePotions to 1
EndIf
'Set DTNPS_HandlePotions to 0' tells the next block of code to add potions into the companion's inventory.
----------------------------------------------------------------------------
Enough for now; I'll try to add some more later on after I take a break...
...DT wanders off into Never Never Land in search of ?...Edit: clarified first paragraph in the 'Additem' section.