Defold error "collectionc"

Hello, I have been having a rough time trying to find out what I am doing wrong here because I have come across this error…

ERROR:GAMEOBJECT: The collection ‘collection4’ could not be created since there is already a socket with the same name.
ERROR:GAMEOBJECT: AcquireResources NewCollection RESULT_OUT_OF_RESOURCES
WARNING:RESOURCE: Unable to create resource: /main/mainMenu.collectionc: OUT_OF_RESOURCES
ERROR:GAMESYS: The collection /main/mainMenu.collectionc could not be loaded.
ERROR:GAMESYS: The collection /main/mainMenu.collectionc could not be unloaded since it was never loaded. Message ‘unload’ sent from main:/controller#controller to main:/controller#mainMenu_proxy.

every single collection has a different name. Do you guys know why?

Hello @pamod.2005 ! :slight_smile:
What are your game.project settings regarding Collections?

Hello :slightly_smiling_face:
I have instances at 1024 and stack input entries at 16

Are you absolutely 100% certain that the collections have different names, set in the properties panel? This is not the same as the file name.

1 Like

You mean the name that comes up on the bottom right or the id/url?

This suggests that you have more than one collection named the same thing: collection4.

I’ve named my collections collection1 collection2 etc so I’m not sure if that’s the case maybe there’s some duplicate that I’m unaware of

Over here. You have to open the collection and click on the root “Collection” in the Outline.

1 Like

If you search for the string collection4, you should really only find it in one place.

Press CTRL+SHIFT+F you’ll get the search window:

1 Like

it says it only comes up in one place

Ok, so are you loading the menuCollection dynamically?
Are you certain it is unloaded before you try to load it?

– show the collection once loaded into memory
if message_id == hash(“proxy_loaded”) then
msg.post(sender, “enable”)
– load the correct collection when a message is received
elseif message_id == hash(“show_firstMenu_screen”) then
– first menu screen
msg.post(self.current_collection, “unload”)
msg.post("/controller#firstMenu_proxy", “load”)
self.current_collection = “/controller#firstMenu_proxy”
elseif message_id == hash(“show_logIn_screen”) then
– log in screen
msg.post(self.current_collection, “unload”)
msg.post("/controller#logIn_proxy", “load”)
self.current_collection = “/controller#logIn_proxy”
elseif message_id == hash(“show_signUp_screen”) then
– sign up screen
msg.post(self.current_collection, “unload”)
msg.post("/controller#signUp_proxy", “load”)
self.current_collection = “/controller#signUp_proxy”
elseif message_id == hash(“show_mainMenu_screen”) then
msg.post(self.current_collection, “unload”)
msg.post("/controller#mainMenu_proxy", “load”)
self.current_collection = “/controller#mainMenu_proxy”
elseif message_id == hash(“show_levelSelection_screen”) then
msg.post(self.current_collection, “unload”)
msg.post("/controller#levelSelection_proxy", “load”)
self.current_collection = “/controller#levelSelection_proxy”
elseif message_id == hash(“show_settings_screen”) then
msg.post(self.current_collection, “unload”)
msg.post("/controller#settings_proxy", “load”)
self.current_collection = “/controller#settings_proxy”
elseif message_id == hash(“show_customisation_screen”) then
msg.post(self.current_collection, “unload”)
msg.post("/controller#customisation_proxy", “load”)
self.current_collection = “/controller#customisation_proxy”
elseif message_id == hash(“closeGame”) then
os.exit()
end
end```

Please put your code within three backticks ´, to format it. That way it will be much more readable:

like this

do you mean like this ‘’’…’’’?

No, the back tick looks like this `
You’ll notice yourself when it looks different when you type your post.
It should look

like this

ohh okay now I see it

it should look like that now in my original post

I have made a new controller message hash and it works now. Thank you for all your help😁