Hi! I've just loaded a saved game where your mod was active but hadn't been used yet to switch characters. This resulted in a crash:
355.129 Error AppManagerStates.cpp:1662: The mod Multiple Characters (0.3.4) caused a non-recoverable error.
Please report this error to the mod author.
Error while running event multiple-characters::on_configuration_changed
__multiple-characters__/control.lua:358: attempt to index field 'character_tag' (a nil value)
stack traceback:
__multiple-characters__/control.lua:358: in function 'unregister_character'
__multiple-characters__/control.lua:373: in function <__multiple-characters__/control.lua:370>
Changing line 358 to
if global.character_tag and global.character_tag[character.unit_number] ~= nil then
will fix this. So far, I didn't get another crash yet, but line 364 also looks like it could break. Better make sure that a valid tag exists before trying to destroy it:
if tag and tag.valid then
tag.destroy()
end