The script looks something like this (with some displays to see what's going on):
float SCountprinttoconsole "aaa"set SCount to player.GetItemCount Stealthboyprinttoconsole "Count %f" SCountprinttoconsole "yyy"player.removeitem Stealthboy SCount
The result is:
aaa
yyy
In other words, no display of the SCount line, presumably because SCount is being set to some invalid value. No stealth boys are removed.
Am I completely misunderstanding how GetItemCount works? Is GetItemCount not allowed in a dialogue result script? Or is it just another bugged function?
Note that GetItemCount is working perfectly in the conditions for the dialogue entry.