Problem with Collection Proxy (SOLVED)

Hello, i readed and tried to implement collection proxy manual for my prototype.
But it says
‘ERROR:GAMEOBJECT: The collection ‘default’ could not be created since there is already a socket with the same name.
ERROR:GAMESYS: The collection /main/game.collectionc could not be unloaded since it was never loaded. Message ‘unload’ sent from default:/loader#loader to default:/loader#game.
ERROR:GAMEOBJECT: The collection ‘default’ could not be created since there is already a socket with the same name.’

this but i have no idea what’s wrong with my codes

here is code

local function unload(self)
print("unload")
msg.post("#game", "unload")
end

local function load(self)
print("load")
msg.post("#game", "async_load")
end

function init(self)
msg.post(".", "acquire_input_focus")
end

function on_input(self, action_id, action)
if (action_id == hash("startProx")) then
unload(self)
load(self)
end
end

function on_message(self, message_id, message, sender)
if (message_id == hash("proxy_loaded")) then
print("init")
pprint(sender)
msg.post(sender, "init")
msg.post(sender, "enable")
end
end

Every time you create a collection, its name is ‘default’ by default. So you should change the collection name to something else e.g, gamecollection. This name can be found in the bottom right corner when you’ve opened a collection file.

3 Likes

Ugh.Good to know this thanks :slight_smile:

2 Likes

Ran into the same problem today. Good someone has answered this before.

1 Like