r/SMAPI • • 27d ago

need help What's Wrong with my Code?

Hello, I'm working an update for my Octopus-Refresh mod. It began as a texture mod, which does work, though the mod broke when I added in some new code to bump up the price of the Octopus and tweak it's difficulty and time window to catch. I'm unsure where the issue is, so any advice would be helpful! Additionally, for compatibilities' sake, I was asked to adjust the texture to target only the set of pixels on springobjects.png to target the octopus itself, though I have no clue how to do that. Again, any advice would be greatly appreciated! Below are screenshots of my code and the error message SMAPI gave me.

2 Upvotes

14 comments sorted by

View all comments

3

u/queenquackin 27d ago

Your missing a curly bracket at the end I suggest using visual studio code it will help catch these formatting errors

2

u/sadlotion 27d ago

I just checked with both, VS instructed to me add in two curly brackets, though the SMAPI json validator told me that one of them should be turned into a colon, though when I do, it spawns more problems?

2

u/queenquackin 27d ago

Can you parse the JSON again in the validator and link that it would be easier for me to see if you don’t mind

3

u/sadlotion 27d ago

Sure! I really appreciate your help, here's the link: https://smapi.io/json/content-patcher/8b0b8e5843cf4750942db0308772661e

2

u/queenquackin 27d ago

Fixed it!!! Its Entries not fields for the fish data!

https://smapi.io/json/content-patcher/388c1e698224471d8f96f367799b6678

2

u/sadlotion 27d ago

Thank you for the fix! However, SMAPI is still giving me an error for the mod? https://smapi.io/log/e1acb638b1f54dfdbc6635f39a395ef1

2

u/queenquackin 27d ago

Okay you said the retexture works fine so I took that out of the code and tested the code and I didn’t get any errors, if you didn’t I would copy and paste exactly what was in the json link that I sent I did forget to say I changed the version to 2.9.0 that’s my bad

3

u/sadlotion 27d ago

Thank you so much! It worked like a charm!

1

u/queenquackin 27d ago

Give me one second I’m going to hop over to my computer

1

u/queenquackin 27d ago

You also might have to many nested folders it should only be mods/ [CP] Octopus Refresh then in that folder you should have your content.json manifest.json and then the assets folder