Page 1 of 2
CRASH value must be dictionary in property tree at root
Posted: Thu May 03, 2018 10:14 pm
by wrathofbong46290
I am trying to create my first mod. I went to the wiki page copied and pasted everything to see the tutorial mods code, and how it worked. and I get value must be dictionary in property tree at root every time I launch with the mod in my mods folder. I saw someone on here said the mods-list.json is corrupted, but I already tried deleting it, and letting the game re-create it, but it won't even recreate it until I remove the mod from the folder. Nothing in the wiki page states why this error occurs so I have no idea what is wrong with the tutorial mod.
P.S. I have programmed in C++ so I'm not new to programming I just need info on what the errors are trying to say.
Re: CRASH value must be dictionary in property tree at root
Posted: Thu May 03, 2018 10:58 pm
by Deadlock989
Usually that error means you have assigned an unexpected value to a prototype field that expects the value to be one from a list of acceptable strings (i.e. the "dictionary"). For example, energy_source.type can only be "burner" or "electric" or "heat", it can't be "burners" or "electrickery" or "wildebeest".
Without seeing your code, or the error, or the line number given, it's impossible to tell exactly what.
It's not a crash.
Re: CRASH value must be dictionary in property tree at root
Posted: Thu May 03, 2018 11:02 pm
by wrathofbong46290
this is my code
https://wiki.factorio.com/Tutorial:Modd ... al/Gangsir
like I said. I copied it straight from the tutorial to get an idea of how mods work I literally just copied and pasted the sections they showed
Re: CRASH value must be dictionary in property tree at root
Posted: Thu May 03, 2018 11:06 pm
by Deadlock989
There's a whole bunch of stuff on that page. People can help if you post the actual code the game is trying to run.
Re: CRASH value must be dictionary in property tree at root
Posted: Fri May 04, 2018 12:01 am
by wrathofbong46290
It's not that complicated....... the parts in green is code if your not willing to help that's fine I will wait for someone else competent to help.
Re: CRASH value must be dictionary in property tree at root
Posted: Fri May 04, 2018 12:02 am
by Deadlock989
wrathofbong46290 wrote:It's not that complicated....... the parts in green is code if your not willing to help that's fine I will wait for someone else competent to help.
... Charming. Well, that's the last time I try and help a noob.
Re: CRASH value must be dictionary in property tree at root
Posted: Fri May 04, 2018 12:07 am
by wrathofbong46290
Deadlock989 wrote:wrathofbong46290 wrote:It's not that complicated....... the parts in green is code if your not willing to help that's fine I will wait for someone else competent to help.
... Charming. Well, that's the last time I try and help a noob.
coming from the person who didn't read for 2 seconds you didn't help anyone you wasted my time
Re: CRASH value must be dictionary in property tree at root
Posted: Fri May 04, 2018 12:41 am
by orzelek
2 things:
1. When asking for help presenting what you want help with would be really nice. Pasting link to whole tutorial.. is not that helpful. And it doesn't really answer question what code are you trying to run.
2. Game changes and tutorial might have gotten outdated - my guess would be that some prototype parmeters have changed. Without knowing actual code it's hard to help unless we owuld try to do the tutorial - and still no guearantee that we would encounter the same issue then.
PS.
@Deadlock989 You are becoming less and less patient
Re: CRASH value must be dictionary in property tree at root
Posted: Fri May 04, 2018 12:59 am
by Nexela
orzelek wrote:2 things:
PS.
@Deadlock989 You are becoming less and less patient
I Agree, and I LIKE IT
Re: CRASH value must be dictionary in property tree at root
Posted: Fri May 04, 2018 7:33 am
by Optera
Seems like Deadlock also reached the point where he explained the same thing over and over until patience ran out.
Welcome to the club.
Re: CRASH value must be dictionary in property tree at root
Posted: Fri May 04, 2018 7:47 am
by Bilka
Optera wrote:Seems like Deadlock also reached the point where he explained the same thing over and over until patience ran out.
Welcome to the club.
Just put an explanation on the wiki and link people there instead of explaining it again every time. Works rather well for me
Re: CRASH value must be dictionary in property tree at root
Posted: Fri May 04, 2018 7:53 am
by bobingabout
Bilka wrote:Optera wrote:Seems like Deadlock also reached the point where he explained the same thing over and over until patience ran out.
Welcome to the club.
Just put an explanation on the wiki and link people there instead of explaining it again every time. Works rather well for me
I've actually had people tell me just how much they hate you, because when they ask for help, you just respond with a wiki link.
come to think of it, that's why deadlock dropped out of this topic, isn't it? the person asking for help just linked a wiki page.
But yeah, If the OP (original poster) wants to either zip the mod and upload it somewhere and post a link, or put the code on pastebin or even github (you know I hate github), then I'll take a look and point out any issues I notice.
Re: CRASH value must be dictionary in property tree at root
Posted: Fri May 04, 2018 8:01 am
by Bilka
bobingabout wrote:I've actually had people tell me just how much they hate you, because when they ask for help, you just respond with a wiki link.
That's news to me, thanks for telling me; I'll copy paste the answer from the wiki from now on. That will be just as fast for me and hopefully more helpful for people who dont like to read the wiki.
Re: CRASH value must be dictionary in property tree at root
Posted: Fri May 04, 2018 8:06 am
by Aeternus
wrathofbong46290 wrote:It's not that complicated....... the parts in green is code if your not willing to help that's fine I will wait for someone else competent to help.
On the contrary, you've got someone willing to help, wanting to verify that you didn't mess up in that copy/paste you have done (something as simple as copying a dot that isn't supposed to be included or something can mess up code) and your response is, well... self-entitled.
If you did that copy/paste once, what's the effort of doing it again, from your code text snipplet into the text field for this forum?
Bottom line, without -your- code, not the example on the wiki but whatever you interpreted from it, we cannot help. Open your source!
Re: CRASH value must be dictionary in property tree at root
Posted: Fri May 04, 2018 8:29 am
by posila
The error means that some structured data (like JSON or prototype definitions in Lua) are not structured properly. If it says just "at root", my guess is info.json is somehow wrong (either you didn't copy surrounding {}, or you wrote something after closing } ... I don't know). Factorio log might provide better context.
Re: CRASH value must be dictionary in property tree at root
Posted: Fri May 04, 2018 9:37 am
by wrathofbong46290
posila wrote:The error means that some structured data (like JSON or prototype definitions in Lua) are not structured properly. If it says just "at root", my guess is info.json is somehow wrong (either you didn't copy surrounding {}, or you wrote something after closing } ... I don't know). Factorio log might provide better context.
Thank you for being the first helpful post I will go back and look at the info.json file
Re: CRASH value must be dictionary in property tree at root
Posted: Fri May 04, 2018 10:34 am
by wrathofbong46290
Thank you @posila I found out the problem. I had capitalized the "Description" because I'm use to camel casing programming. Once I removed the capital it worked, thank you so much for actually being helpful.
Re: CRASH value must be dictionary in property tree at root
Posted: Fri May 04, 2018 12:20 pm
by eradicator
posila wrote:The error means that some structured data (like JSON or prototype definitions in Lua) are not structured properly. If it says just "at root", my guess is info.json is somehow wrong (either you didn't copy surrounding {}, or you wrote something after closing } ... I don't know). Factorio log might provide better context.
You should really force the next newcomer/trainee to include proper error messages for the info.json stage. I've seen far too many threads of people having hidden errors with that silently fail or w/e. And while they're at it might as well add errors to changelog.txt parsing :P
@bob: What's wrong with github & you? :D (Link to answer is fine :P)
Re: CRASH value must be dictionary in property tree at root
Posted: Fri May 04, 2018 1:32 pm
by Deadlock989
So, to summarise, the OP had in fact changed what they had copy-pasted, but threw a strop when asked to post the actual code being used, instead of just vague links to a years-old wall of text that they'd screwed up anyway.
And it turned out to be that actually, they had changed the value of a field which expects specific values. Which is literally the very first answer given to him by yours truly.
They do say that no good deed goes unpunished.
Re: CRASH value must be dictionary in property tree at root
Posted: Fri May 04, 2018 8:10 pm
by wrathofbong46290
Deadlock989 wrote:So, to summarise, the OP had in fact changed what they had copy-pasted, but threw a strop when asked to post the actual code being used, instead of just vague links to a years-old wall of text that they'd screwed up anyway.
And it turned out to be that actually, they had changed the value of a field which expects specific values. Which is literally the very first answer given to him by yours truly.
They do say that no good deed goes unpunished.
Funny your still here complaning, and I know your not comptent to notice, and I know your as new to reading as I am to LUA, but if you read for 2 seconds you notice he told me where my problem was and I fixed it. If you were comptent to tell me what he did on your first msg. There would of only needed to have been 1 reply. You really are something special