I want a jug of water, but the game wants a bra and panties?

Hey guys! I tried adding some things to the survivor profession to make it a self insert class, in which I’m dropped in with several things I own, and it worked up until I tried replacing the standard water bottle with a gallon jug of water. Now when I try to start a new game I get this message.

 DEBUG    : Error: data/mods//dda/../../json/professions.json: line 149:3: tried to start object, but found '}', not '{'


      "female": [ "bra", "panties" ]
    }
  }
  ^
   ,
  {
    "type": "profession",

 
 FUNCTION : bool main_menu::new_character_tab()
 FILE     : src/main_menu.cpp
 LINE     : 658

I’m new to coding, so I don’t know what went wrong. Here’s the bit of code I changed in the json file.

    "type": "profession",
    "ident": "unemployed",
    "name": "Survivor",
    "description": "Some would say that there's nothing particularly notable about you.  But you've survived, and that's more than most could say right now.",
    "points": 0,
    "items": {
      "both": [ "pants_cargo", "tshirt", "socks", "hoodie", "sneakers", "leather_belt", "pockknife", "bokken", "backpack", "cell_phone" ],
        "entries": [
          { "item": "lighter", "charges": 30 },
          { "item": "jug_plastic", "ammo-item": "water_clean", "charges": 15 }
        ]
      },
      "male": [ "boxer_briefs" ],
      "female": [ "bra", "panties" ]
    }
  },
  {

Anyone with more experience know what I did wrong?

Not sure but it seems you forgot a { somewhere.

Here I think you’re closing with a } but there’s no opening { .

That’s the thing, I can’t find any instance where there’s a “female”: [ “bra”, “panties” ] }. The part I messed with worked just fine until I added this part.

"entries": [ { "item": "lighter", "charges": 30 }, { "item": "jug_plastic", "ammo-item": "water_clean", "charges": 15 }

It’s just there in your bit of code, line 14

That line is the same as it was before I started messing with the code. No, the problem seems to be this part.

        "entries": [
          { "item": "lighter", "charges": 30 },
          { "item": "jug_plastic", "ammo-item": "water_clean", "charges": 15 }
        ]
      },

Everything works fine when I get rid of that part.

Looking at the json for profession it seems that the professions using "entries": inside "both" uses "items": to describe the first list of items.

"items": {
  "both": {
    "items": [
1 Like

Thanks man! It’s working now! Although, now I have another problem, my plastic jug is empty. Is there a way to fix the code so I spawn with it full of clean water?

          { "item": "jug_plastic", "ammo-item": "water_clean", "charges": 15 }

Edit: Nevermind! I got it working! Turns out I was using code for a gun instead of a container.

          { "item": "water_clean", "charges": 15, "container-item": "jug_plastic" }