Need Help With A Code

mod
#1

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

#2

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

#3

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” ]

#4

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!)

#5

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

#6

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

#8

“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.