GameMaker Resource file is malformed. Item with the same key exists?

The full error message is: 'Resource file is malformed 'scripts\init_sys_tray\init_sys_tray.yy' An item with the same key has already been added.' It pops up everytime I load the project file. I've tried running the Clean command, and I've tried removing 'init_sys_tray.yy' from Scripts, reloading, then putting it back, but it still comes up the same. Is there any way to flush duplicates from GM's file loading data structure?
 
We use a git repo so backups aren't the issue - the issue is that the duplicate key appeared a long time ago, and we've just been clicking past it. It's not a fatal error so I've never been too bothered by it, but I just wanted to know if it was possible to fix. Surely GM would have a fix for something like this? I'll look into the importer, but I was hoping to find a bug fix from YoYo, or something along those lines.
 

rIKmAN

Member
We use a git repo so backups aren't the issue - the issue is that the duplicate key appeared a long time ago, and we've just been clicking past it. It's not a fatal error so I've never been too bothered by it, but I just wanted to know if it was possible to fix. Surely GM would have a fix for something like this? I'll look into the importer, but I was hoping to find a bug fix from YoYo, or something along those lines.
You'd have to send your project in to YYG attached to a ticket for them to take a look at it I think, there is no fix all solution for project specific errors.
Not sure how big your project is but searching through all the project files for any references to the problematic .yy file might be quicker.

If your project is too big then maybe write a little tool to read the files and report back where the reference was found, although it would probably be quicker to just try importing everything to a new project and see if the error actually disappears first before trying anything like that.
 
Top