OpenMW: Assertion `it != invStore.end()' failed
I executed this script:
Begin asmo_amulet_script Short OnPCEquip if ( OnPCEquip == 1 ) ; delete myself if ( asmo_conmer_s_active_amulet_status_glob == 1 ) ; reset active glob for next amulet set asmo_conmer_s_active_amulet_status_glob to 0 ; deleting amulet from inventory and if equipped - works in OpenMW ... or not? player->RemoveItem asmo_conmer_amulet 1 endif endif End asmo_amulet_scrip
I attached the "complete" mod. To see what I did you can use "asmo_" as ID search term.
Howto Execute the following in the console resp. the character portrait/inventory
1) player->additem asmo_conmer_amulet 2 2) equip one amulet 3) set asmo_conmer_s_active_amuletID_glob to 1 ; -> equipped amulet disappears 4) equip the other amulet 5) set asmo_conmer_s_active_amuletID_glob to 1 ; -> equipped amulet does not disappear 6) unequip it, then equip again -> "Fatal Error"When you add three amulets only one disappers(3), the second disappears when you try to equip it, the last causes "Fatal Error" (6).
When there is only one amulet in the inventory or equipped there is no problem, not with repeating add + delete either.
Not sure about a title so change to whatever the problem is, I guess it's related to RemoveItem().
(RM-2962 from redmine: created on 2015-10-06 by Who Knows, , closed on 2015-10-13 by scrawl .)
Attachments: crash.log test_amuletIDs.omwaddon
Edited by redmine