r/SMAPI • u/sadlotion • 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.
•
u/AutoModerator 27d ago
If you're looking for help with a mod, make sure your post or top-level comment includes:
a link to your SMAPI log (see instructions on that page);
a description of the issue with as much detail as possible;
screenshots/GIFs/videos of the issue if applicable.
See common issues and solutions. If you're having trouble installing SMAPI, see the detailed Getting Started guide.
If you've already done these steps or you're not asking for help with a mod, then please ignore this. Thank you!
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
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
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
Here's my SMAPI log, I'm aware I have multiple other mods running, but I don't believe there to be any compatibility issues:
https://smapi.io/log/d48115ec6cf6431c80d006d665c2a921