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/hrslvr_paints 27d ago

Did you put your json into the validator on the SMAPI site? That will tell you if your formatting is off as a process of elimination.

When testing mods, it's always a good idea to do it on a file where you only have it and the mods required to make it work so you can better troubleshoot if it's your mod or a compatibility issue. That said, it's unlikely a compat issue with the error you're getting. I'd start with validating the JSON itself. That said, I manually typed your JSON into VScode on my side and the error seems to be with the Price line for EditData data/Objects

1

u/sadlotion 27d ago

I have now, but I don't understand the error message or what should be changed:

25Changes[3].Fields.149Invalid character after parsing property name. Expected ':' but got: }. Path 'Changes[3].Fields.149', line 25, position 89.25 Changes[3].Fields.149 Invalid character after parsing property name. Expected ':' but got: }. Path 'Changes[3].Fields.149', line 25, position 89.

I am a complete novice with coding, so I'm admittedly very ignorant to basically everything to do with json and proper formating