Page 1 of 1

Error in AssignID

Posted: Tue Jan 12, 2016 1:55 pm
by Blu3wolf
So Ive deliberately caused one of these errors, by setting a specific item (diamond-ore) to nil, essentially deleting it. Something is evidently referencing this item, otherwise I would not be getting the error. I cant find what is referencing it though, and Ive been at it for a few hours.

Is there an easier way to find it, other than opening all the lua files I can find and searching for the string 'diamond-ore'? because if thats the only way, then Im stumped - the string is only in two places, and both of those places in turn should not be getting as far as AssignID (as they have also been set to nil).

Related to the above, when does the AssignID process happen in relation to data.lua, data-updates.lua, and data-final-fixes.lua? Im guessing after all of them, but Im not sure.

Cheers all!

Re: Error in AssignID

Posted: Tue Jan 12, 2016 7:22 pm
by Rseding91
What's the exact message you're getting? It should contain the mod(s) the error is coming from (or at least point to one of them to get started).

The ID assignment happens after all of the mods are loaded (after all data----.lua phases).

Re: Error in AssignID

Posted: Wed Jan 13, 2016 1:04 am
by Blu3wolf
Error in AssignID, item with name 'diamond-ore' does not exist

That is the entire error message I am getting.

Re: Error in AssignID

Posted: Tue Jan 19, 2016 5:42 pm
by matjojo
Blu3wolf wrote:Error in AssignID, item with name 'diamond-ore' does not exist

That is the entire error message I am getting.
I remember getting this when trying to give a name in the locale files to things that don't exist. those error messages do indeed not specify all too much.

Re: Error in AssignID

Posted: Tue Jan 19, 2016 7:02 pm
by Rseding91
What I'd do is simply open all of the files in the mod and do a search for the text. It will show anywhere that it's being used and you can remove it.

Re: Error in AssignID

Posted: Tue Mar 01, 2016 2:21 pm
by Blu3wolf
Took me a while but that was ultimately the solution I had to use Rseding. Cheers for the suggestion.

Is that an error message that could be improved in a future version?

Re: Error in AssignID

Posted: Tue Mar 01, 2016 2:26 pm
by Rockstar04
I just had to battle this non descript error the other day, where the FARL mod was looping through every electric-pole item, and not calling it by name, so it was even harder to find the error.

Re: Error in AssignID

Posted: Tue Mar 01, 2016 8:09 pm
by Rseding91
Blu3wolf wrote:Took me a while but that was ultimately the solution I had to use Rseding. Cheers for the suggestion.

Is that an error message that could be improved in a future version?
Can you upload a mod set that reproduces the error so I can test different error messages?

Re: Error in AssignID

Posted: Tue Mar 01, 2016 11:27 pm
by Blu3wolf
I could, but an easy way to replicate it would be to load up any mod, and in data set something to nil.

Data.raw["item-group"]["production"] = nil

For instance. The error comes up most often for me when removing things this way, which has been a more common use scenario for me than I expected - its useful to disabled things present in other mods when your mod is loaded, but getting factorio to start means all the references to the removed item/item-group/whatever need to get removed as well. Finding those can be hard. It wouldnt hurt to have an error that specifies what is causing it.

Otherwise tonight I could upload a set of mods that would replicate the error.

Re: Error in AssignID

Posted: Wed Mar 02, 2016 1:46 am
by Rseding91
Blu3wolf wrote:I could, but an easy way to replicate it would be to load up any mod, and in data set something to nil.

Data.raw["item-group"]["production"] = nil

For instance. The error comes up most often for me when removing things this way, which has been a more common use scenario for me than I expected - its useful to disabled things present in other mods when your mod is loaded, but getting factorio to start means all the references to the removed item/item-group/whatever need to get removed as well. Finding those can be hard. It wouldnt hurt to have an error that specifies what is causing it.

Otherwise tonight I could upload a set of mods that would replicate the error.
A set of mods would be nice.

Re: Error in AssignID

Posted: Wed Mar 02, 2016 3:46 am
by Blu3wolf
mod is here: https://github.com/Blu3wolf/HARDmod/arc ... eShoot.zip

rename to HARDmod_0.1.0.zip

dependencies can be found online but are mirrored here for your convenience: http://blu3wolf.com/Factorio/

The set of mods provided here will cause an error on starting Factorio "Error in AssignID; item with name "raw-ruby" does not exist."

An ideal error message could identify the line in the file that tries to reference the item with name 'raw-ruby' in question.

Thanks for looking into this!

Re: Error in AssignID

Posted: Sun Dec 04, 2016 7:46 pm
by Boogieman14
Version 0.14.21 is still giving this rather nondescript error message with the following mod set:

https://www.dropbox.com/s/q5w7nc2etloxdhy/mods.zip?dl=0

Just including the name of the item that's trying to include the missing item would probably already help massively.

Re: Error in AssignID

Posted: Sun Dec 04, 2016 8:33 pm
by Rseding91
Boogieman14 wrote:Version 0.14.21 is still giving this rather nondescript error message with the following mod set:

https://www.dropbox.com/s/q5w7nc2etloxdhy/mods.zip?dl=0

Just including the name of the item that's trying to include the missing item would probably already help massively.
Any prototype can have that error - it's nothing specific to items.

Also I improved the error for 0.15.