Morrowind Mod talk:GetItemCount
The UESPWiki – Your source for The Elder Scrolls since 1995
Bugs[edit]
note: the following code in a global script causes crashes in my game as of 2005-04-11
short grn set grn to ( player->getitemcount, "misc_soulgem_grand" )
however, this works (note the lack of a comma following getitemcount)
short grn set grn to ( player->getitemcount "misc_soulgem_grand" )
--Halo112358 22:48, 11 Apr 2005 (EDT)
- The following code will crash a script in any of the forms
GetItemCount, "torch" GetItemCount "torch" GetItemCount torch
- This issue seems to be specific to the item "torch" as the function does work for everything item (including other lights). It is possible this is caused by it being a single word item name where there are a number of other items with the same name followed by an 'underscore' then something else - e.g. 'torch_128', 'torch_256'. It does work for RemoveItem and AddItem. Renaming the item or creating a copy called torch_01 and working with that instead works. Renaming it would stop other scripts/mods working (e.g. Light The Way) that call the item by name. I have yet to discover another solution.
- --[RogiVagel 26/12/2023]