Hi there as the title suggests i'm having a problem with this error message. It pops up when I try to add an event to the current map with another even that is triggerd by a parallel proces. Now I know why this shows up, but is there a way to circumvent this issue? I'm using rpg maker xp.
Thanks in advance
First of all, does the event have a valid ID? I mean, one that isn't colliding with any existing event for starters. So the key here is the ID itself and the value, namely the new event.
Hey,
I don't have RMXP installed currently so I might not be able to help, and I'm not sure why it shows up exactly since at least the base scripts do not use any of the methods that would trigger it as far as I remember, and I don't know what you might have added or what exactly you might be attempting to do to achieve your goal.
Generally, if you are using hash.each_key, hash.each_value or hash.each_pair to iterate over a hash, you could try hash.keys.each, hash.values.each or hash.to_a.each instead.
(These methods create working copies of the content of the hash, allowing you to add keys to the hash afterwards without disrupting the iteration)
An alternative might be to delay the addition of your events until the iteration is over (might be more complicated than the above).
Before providing any further pieces of advice, we all need to see the actual code the OP is using that is causing the issue. Why? Because iteration and adding new elements to Arrays and Hashes are normally UnrelateD.