ERROR:GAMEOBJECT: Could not create script component, out of resources

I’m receiving the following error:

roughly 1 week ago I bundled the same project and that version can run completely fine.
I increased the Max Instances in the collection area to the max value of 32765, no luck there:
image

Locally running from the IDE, there is no error or issue - this is only appearing when I try to load a collection that facilitates the main gameplay - the ability to load collections of an intro screen and main menu are working just fine. Pulling an earlier version of the code and bundling it, I get the same error despite that version being before the point I saw the bundled package working.

I cut away a ton of the project and still get the error, at a certain point if I removed a bunch of the require calls or scripts/lua files I was able to get the program to not have the issue anymore. I can’t tell if it’s because I initialized a save file multiple times or if there’s just too many files. Here’s the neutered version of the program:

If i need to I can put in the full project. any insight would be appreciated, this is driving me nuts trying to figure out what’s wrong.

Please copy/paste full log as text, not as screenshot.
Also provide SHA1 (help->about) of your engine

Sure thing!

INFO:DLIB: Log server started on port 53639
INFO:ENGINE: Target listening with name: Colossus - fe80::b528:58c0:7926:1af3 - Windows
INFO:ENGINE: Engine service started on port 8001
INFO:GRAPHICS: Installed graphics device 'ADAPTER_FAMILY_OPENGL'
INFO:ENGINE: Defold Engine 1.9.5 (d01194c)
INFO:DLIB: Initialized Remotery (ws://127.0.0.1:17815/rmt)
WARNING:DLIB: Unable to convert 'true' to int
INFO:ENGINE: Loading data from: archive:game.dmanifest
INFO:LIVEUPDATE: Liveupdate folder located at: C:\Users\surfa\AppData\Roaming\6d450c8ef368a02893b7767b1c2a134d517c81eb
INFO:LIVEUPDATE: Found no legacy liveupdate zip file references
INFO:LIVEUPDATE: Found no legacy liveupdate index paths
INFO:ENGINE: Initialised sound device 'default'
DEBUG:SCRIPT: Version is:       2.4
INFO:DLIB: SSDP: Started on address 192.168.1.168
DEBUG:SCRIPT: Now changing Loot Display for     PlayerNode2
DEBUG:SCRIPT: for       PlayerNode2      The Loot is    hash: [Finger Gun]
DEBUG:SCRIPT: for       PlayerNode2      The Loot is    hash: [Bile Bomb]
DEBUG:SCRIPT: for       PlayerNode2      The Loot is    hash: [Lubricated Joints]
DEBUG:SCRIPT: Open Logic        PlayerNode1     true
DEBUG:SCRIPT: Open Logic        PlayerNode2     true
DEBUG:SCRIPT: Open Logic        PlayerNode3     true
ERROR:GAMEOBJECT: Could not create script component, out of resources. Increase the 'collection.max_instances' value in [game.project](defold://open?path=/game.project)
WARNING:RESOURCE: Unable to create resource: /main/Screens/GameScene/GameScreen.collectionc: FORMAT_ERROR
ERROR:GAMESYS: The collection /main/Screens/GameScene/GameScreen.collectionc could not be loaded.

Engine SHA1: d01194cf0fb576b516a1dca6af6f643e9e590051

1 Like

I believe I found the culprit, but I don’t know the exact reason why this is the case: These 4 scripts are what determine damage values passed into enemy sets, and if I delete any 2, the screen properly loads (of course, it also breaks, since it can’t communicate properly, but that’s a code issue).
image

It looks like the engine doesn’t like it when more than 3 scripts are added to a collection’s GO.
I added an extra script in some spots in tutorials to check if this was something common, and it seems they also break when multiple scripts are introduced, however I’ve been able to make multiple builds for months that run just fine with this script setup - is this expected behavior and I’ve just been dodging the catch on it up to now, or does this seem like a bug of some kind?

It’s a bug. Could you please open issue in the isuse tracher using Help->Report Issue ? I’ll fix it into the next (1.9.6) version.

1 Like

much appreciated! it’s in as #9866

2 Likes