Need Help With A Code

What’s Wrong With…

[
{
“id”: “ray_gun”,
“type”: “GUN”,
“reload_noise_volume”: 30,
“name”: “Ray Gun”,
“name_plural”: “Ray Gun”,
“description”: “This Contraption is supremely deadly it has a note on its barrel saying US MILITARY ARMS.”,
“weight”: 1000,
“volume”: 4,
“price”: 12500,
“to_hit”: 1,
“bashing”: 6,
“material”: [ “steel”, “plastic” ]
“ammo”: “batteries”,
“dispersion”: 300,
“sight_dispersion”: 100,
“aim_speed” : 5,
“recoil”: 125,
“durability”: 10,
“reload”: 100,
“loudness” : 150,
“symbol”: “(”,
“color”: “dark_gray”,
“skill”: “rifle”,
}

]

Please tell me

What’s wrong with it? Is it not working when you add it to the game? Any errors during loading or what?

I don’t think you’re supposed to have a comma at the end of

“skill”: “rifle”,

A comma indicates there’s another entry after it. You’re also missing a comma after

“material”: [ “steel”, “plastic” ]

Thank You For Your Replies!
(i fixed it by placing
“ammo”: “batteries”,
“dispersion”: 300,
“sight_dispersion”: 100,
“aim_speed” : 5,
“recoil”: 125,
“durability”: 10,
“reload”: 100,
“loudness” : 150,
“symbol”: “(”,
“color”: “dark_gray”,
“skill”: “rifle”,
before materials all fixed!)

how to use ammunition (i cant seem to do it?)

Also Somethings Wrong With…
[
{
“id”: “ray_gun”,
“type”: “GUN”,
“reload_noise_volume”: 30,
“name”: “Ray Gun”,
“name_plural”: “Ray Gun”,
“description”: “This Contraption is supremely deadly it has a note on its barrel saying US MILITARY ARMS.”,
“weight”: 1000,
“volume”: 4,
“price”: 12500,
“to_hit”: 1,
“bashing”: 6,
“range”: 10,
“ammo”: “batteries”,
“ammo_effects”: [ “LASER”, “DRAW_AS_LINE” ],
“ranged_damage”: -10,
“dispersion”: 300,
“sight_dispersion”: 100,
“aim_speed” : 5,
“recoil”: 125,
“durability”: 10,
“reload”: 100,
“loudness” : 150,
“symbol”: “(”,
“color”: “dark_gray”,
“skill”: “rifle”,
“material”: [ “steel”, “plastic” ],
“magazines”: [ “battery”, [ “light_battery_cell”] ]
}
]

the game says:
DEBUG : Error: data/mods//Custom Mod/gun.json: line 30:3: expected JSON value but got ‘}’

"material": [ "steel", "plastic" ],
"magazines": ["battery", [ "light_battery_cell"]

}
^

10]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]

FUNCTION : bool main_menu::load_character_tab()
FILE : src/main_menu.cpp
LINE : 975

“magazines”: [“battery”, [ “light_battery_cell”]

You’re missing another set of . Copy it from a working item to see what it’s supposed to look like.

Mm-kay. This is a five month old thread. And your post doesn’t really have anything to do with it.

You were given advice in the other thread. Good advice. Read your error message.

It’s expecting a string, which was explained as anything in a ". Instead, it’s finding a ] which it doesn’t like. As for why it’s expecting a string, I don’t know I can’t really read what you’re posting because it’s all messed up.

I recommend you copy an existing mapgen and then make edits to it, rather than trying to do it yourself. Everything in your “rows” section is all messed up.

Copy an existing location and start over is my recommendation. Also, check the guide to creating content that Mark linked you, the mapgen stuff is here.