[12.8] unhelpful errors
Posted: Sun Sep 20, 2015 6:15 pm
To start off, I have a core mod that auto generates slightly changed things from the base. I only pass in the original thing and a table of my changes to make a new thing...
An example is (an item):
With that out of the way, I've hit errors like quite often.
it took me abit to find the issue because I'm only setting 3 things and I've checked over them multiple times and it was working from my previous auto-building which made things worse. I threw a math.floor() around my setting of "discharge_cooldown" & "charge_cooldown" and I'm now at a new error... which I'm also having abit of troubles to figure out but this error is abit better and isn't really the focus... It should have a name but I'll start snooping that and see what I can find...
I just had an idea which might be abit overkill, when verbose logging is true (maybe just all the time?), dump all the data.raw things from the mod that crashed...
(tl;dr)
It would be nice to know what data fails conversion, in this case it would be the cooldowns (double to integer)
An example is (an item):
Code: Select all
_G.vzyGenerateThing({nameAll = machineName, order = "b["..machineName.."]"}, data.raw.item[machineFrom], nil)
Code: Select all
Error Util.cpp:46: Error while loading entity prototype "vzy-compressed-accumulator-lv03" (accumulator): conversion of data to type "t" failed
it took me abit to find the issue because I'm only setting 3 things and I've checked over them multiple times and it was working from my previous auto-building which made things worse. I threw a math.floor() around my setting of "discharge_cooldown" & "charge_cooldown" and I'm now at a new error... which I'm also having abit of troubles to figure out but this error is abit better and isn't really the focus...
Code: Select all
Error Util.cpp:46: Error while loading technology prototype "vzy-compressed-accumulator-lv01" (technology): No such node (name)
I just had an idea which might be abit overkill, when verbose logging is true (maybe just all the time?), dump all the data.raw things from the mod that crashed...
EDIT
(tl;dr)
It would be nice to know what data fails conversion, in this case it would be the cooldowns (double to integer)