
So, I'm new to the javascript coding, so I don't know what mistake I made but, I've double checked to make sure I didn't have overly many {[( or )]}. That said, the script I set up constantly returns an error of SyntaxError: Unexpected identifier . I'm trying to set up an easy way for players in my game to roll for randomized loot without it taking up a full session if they manage to clear a large area (particularly when handling multiple areas the loot could be from, and rolling in multiple tables/ammount to determint type, specific, and number of items)
Here's the code I have, any one got any pointers on this, or know what's going wrong?
var LootRolls = {
Standard Home: [
event(1, "Nothing was found" ),
event(1, (var vegies = {
event(8, "[[1d8]] Pieces of bubblegum" ),
event(7, "[[1d6]] Pieces of candy" ),
event(6, "[[1d4]] Sweetrolls/Pastries" ),
event(5, "[[1d2]] Cram" ),
event(5, "[[1d3]] Canned Fruit/Vegies"),
event(5, "[[1d3]] Big Mac'n'Chesse"),
event(5, "[[1d3]] Dandy Buck Apples"),
event(5, "[[1d3]] Fancy Colt Snack Cakes"),
event(5, "[[1d3]] Insta Mash"),
event(5, "[[1d3]] Noodles"),
event(5, "[[1d3]] Potato Crisps"),
event(5, "[[1d3]] Sugar Apple Bombs"),
event(5, "[[1d3]] Chocolate Frosted Sugar Bombs"),
event(5, "[[1d3]] Yum Yum Deviled Eggs"),
event(4, "[[1d2]] Fresh Apple"),
event(4, "[[1d2]] Fresh Carrot"),
event(4, "[[1d2]] Fresh Pear"),
event(4, "[[1d2]] Fresh potato"),
event(4, "[[1d2]] Fresh Radish"),
event(4, "[[1d2]] Slop"),
event(3, "Package of Ant Nectar"),
event(3, "Package of Fire Ant Nectar"),
event(3, "Slice of Maresippi Quantum Pie"),
event(1, "A Blood Orange")
)
}
]
};
Here's the code I have, any one got any pointers on this, or know what's going wrong?
var LootRolls = {
Standard Home: [
event(1, "Nothing was found" ),
event(1, (var vegies = {
event(8, "[[1d8]] Pieces of bubblegum" ),
event(7, "[[1d6]] Pieces of candy" ),
event(6, "[[1d4]] Sweetrolls/Pastries" ),
event(5, "[[1d2]] Cram" ),
event(5, "[[1d3]] Canned Fruit/Vegies"),
event(5, "[[1d3]] Big Mac'n'Chesse"),
event(5, "[[1d3]] Dandy Buck Apples"),
event(5, "[[1d3]] Fancy Colt Snack Cakes"),
event(5, "[[1d3]] Insta Mash"),
event(5, "[[1d3]] Noodles"),
event(5, "[[1d3]] Potato Crisps"),
event(5, "[[1d3]] Sugar Apple Bombs"),
event(5, "[[1d3]] Chocolate Frosted Sugar Bombs"),
event(5, "[[1d3]] Yum Yum Deviled Eggs"),
event(4, "[[1d2]] Fresh Apple"),
event(4, "[[1d2]] Fresh Carrot"),
event(4, "[[1d2]] Fresh Pear"),
event(4, "[[1d2]] Fresh potato"),
event(4, "[[1d2]] Fresh Radish"),
event(4, "[[1d2]] Slop"),
event(3, "Package of Ant Nectar"),
event(3, "Package of Fire Ant Nectar"),
event(3, "Slice of Maresippi Quantum Pie"),
event(1, "A Blood Orange")
)
}
]
};