Coding Help Having some errors in my code (First time modder)

thatrat27

Newcomer
Hiii, I'm trying to learn to create mods and I followed the tutorial on the Stardew Modding Wiki for creating a special order. I thought I did the coding right, but when I validated the code on the Smapi JSON Content Patcher validator website I had some errors. I'm just gonna copy-paste said errors.

LineFieldError
2LogNameProperty 'LogName' has not been defined and the schema does not allow additional properties.
3ActionProperty 'Action' has not been defined and the schema does not allow additional properties.
4TargetProperty 'Target' has not been defined and the schema does not allow additional properties.
5EntriesProperty 'Entries' has not been defined and the schema does not allow additional properties.
1Missing required fields: Format, Changes.

Edit: Here's the code as well.

{
"LogName": "Anonymous Wedding Flowers",
"Action": "EditData",
"Target": "Data/SpecialOrders",
"Entries": {
"RattoMod_Anonymous_WeddingFlowersOrder": {
"Name": "Wedding Flowers",
"Requester": "Pierre",
"Duration": "TwoWeeks",
"Repeatable": "False",
"RequiredTags": "!season_spring, !season_winter, !dropbox_PierreBox",
"OrderType": "Donate",
"SpecialRule": "",
"ItemToRemoveOnEnd": null,
"MailToRemoveOnEnd": null,
"RandomizedElements": null,
"Text": "A message from my cousin: I'm getting married soon, and my cousin Pierre says the flowers here are beautiful! Could someone drop off 20 sunflowers at his shop?",
"Objectives": [
{
"Type": "Donate",
"Text": "Drop off 20 Sunflowers in the empty box in Pierre's shop",
"RequiredCount": "20",
"Data": {
"AcceptedContextTags": "item_sunflower",
"DropBox": "PierreBox",
"DropBoxGameLocation": "SeedShop",
"DropBoxIndicatorLocation": "18.5 27"
}
},
{
"Type": "Donate",
"Text": "Drop off 20 Sunflowers in the empty box in Pierre's shop",
"RequiredCount": "20",
"Data": {
"AcceptedContextTags": "item_sunflower",
"DropBox": "PierreBox",
"DropBoxGameLocation": "SeedShop",
"DropBoxIndicatorLocation": "18.5 27"
}
}
],
"Rewards": [
{
"Type": "Money",
"Data": {
"Amount": "5000"
}
},
{
"Type": "Friendship",
"Data": {}
}
]
}
}
}

I've tried googling how to fix all this, and I haven't had much luck. I genuinely don't understand coding at all (which is why I tried to do a beginner's tutorial), so if anyone knows what's wrong, please explain it like I'm an idiot, I'd really appreciate it.
 
Last edited:

thatrat27

Newcomer
Can you post the code as well so that the error can be better connected to the context of the code?
Yes, thanks!

{
"LogName": "Anonymous Wedding Flowers",
"Action": "EditData",
"Target": "Data/SpecialOrders",
"Entries": {
"RattoMod_Anonymous_WeddingFlowersOrder": {
"Name": "Wedding Flowers",
"Requester": "Pierre",
"Duration": "TwoWeeks",
"Repeatable": "False",
"RequiredTags": "!season_spring, !season_winter, !dropbox_PierreBox",
"OrderType": "Donate",
"SpecialRule": "",
"ItemToRemoveOnEnd": null,
"MailToRemoveOnEnd": null,
"RandomizedElements": null,
"Text": "A message from my cousin: I'm getting married soon, and my cousin Pierre says the flowers here are beautiful! Could someone drop off 20 sunflowers at his shop?",
"Objectives": [
{
"Type": "Donate",
"Text": "Drop off 20 Sunflowers in the empty box in Pierre's shop",
"RequiredCount": "20",
"Data": {
"AcceptedContextTags": "item_sunflower",
"DropBox": "PierreBox",
"DropBoxGameLocation": "SeedShop",
"DropBoxIndicatorLocation": "18.5 27"
}
},
{
"Type": "Donate",
"Text": "Drop off 20 Sunflowers in the empty box in Pierre's shop",
"RequiredCount": "20",
"Data": {
"AcceptedContextTags": "item_sunflower",
"DropBox": "PierreBox",
"DropBoxGameLocation": "SeedShop",
"DropBoxIndicatorLocation": "18.5 27"
}
}
],
"Rewards": [
{
"Type": "Money",
"Data": {
"Amount": "5000"
}
},
{
"Type": "Friendship",
"Data": {}
}
]
}
}
}
 

GxEagle

Newcomer
I don't know if you've already fixed it but you need to follow the next template for the content.json file:
Code:
{
    "Format": "2.8.0",
    "Changes": [
        // your changes will go here
    ]
}
so, you only need to add the brackets and braces at the end and the beginning, also add the Content Patcher Version you are using and the word "Changes" to fix the errors you got in the JSON validator.
Here's the link: https://smapi.io/json/content-patcher/668df1417a7541dca076a7043866020a
 
Top