SOLVED Attemping to add instance multiple times?

Neptune

Member
Any ideas what would cause this? I don't use instance_create_layer anywhere.

I think there are serious issues when duplicating a room in 2.3+
That being said, this isn't a duplicated room, it was the "parent" or original room... The errors happens right as you enter it 🤔


[EDIT] I think I found the culprit... I wonder why this would happen tho
 

cryos

Member
Dealing a bunch with this error and it's really annoying to debug because there are no tools for debugging the IDE. Anyone know of a good way to deal with this issue when you have tons of instances in a room?

Normally I would probably just ignore errors like this however it appears any instances that give this error do not run the creation event. So the games crashes when a variable within the particular instance is evaluated.
 
That seems like it might be an error caused by layer_add_instance
Perhaps used when duplicating rooms?

I'm gonna do a little test with layer_add_instance
 
So...
GML:
// Object1: Create
MyLayer    = layer_create(-10, "MyLayer");

MyInstance    = instance_create_depth(0, 0, 0, oTest);

layer_add_instance(MyLayer, MyInstance);
layer_add_instance(MyLayer, MyInstance);
did not produce any errors or similar output messages
 

cryos

Member
My instances (in this particular case) are manually placed in the room and not created via code. I think it is caused by copying/pasting instances in the room and sometimes it will make an exact copy of the instance, instance ID and all. It's just another IDE bug and I will find a way to work around it.
 
Top