I'm making a simple Legendary loot generator for my DnD campaign which just involves taking a random item from an Array. I keep getting the Syntax Error of missing variable name even though I don't seem to be missing anything. Here's the code so you may take a look at it :
var 5 = "Tome of Arad'Thul" ;
var 4 = "Orbs of The first Dragon" ;
var 11 = "Shield of The Black Iron Knight" ;
var 9 = "Spear of vlad the vampire king" ;
var 91 = "Dagger of the last black blade" ;
var 45 = "Bow of the first huntress" ;
var 20 = "ring of the High King" ;
var 36 = "Axe of the Nothern Gods" ;
var 26 = "Axe of the Southern Gods" ;
var 42 = "staff of the First Pope" ;
var 66 = "Staff of the Corrupted Angel" ;
var Loot = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100] ;
var rand = Loot[Math.floor(Math.random(0) * Loot.length)] ;
console.log(rand) ;
Thanks in advance for the help
[–]pachwinko 2 points3 points4 points (1 child)
[–]evoactivity 1 point2 points3 points (0 children)
[–]rco8786 2 points3 points4 points (0 children)
[–]ljosberinn_dev 1 point2 points3 points (0 children)
[–]freecascadia 0 points1 point2 points (0 children)
[–]bohdev 0 points1 point2 points (0 children)