Maverick Jones
Maverick Jones

Reputation: 434

Confusing JSLINT Error

I'm making a JavaScript dice roller for a tabletop strategy game that my friends and I play, but I've hit a snag. Basically there is an irregular hit table, so I can't use a formula (as far as I can tell) to judge the result, instead I've got a whole bunch of switch and if .. else statements to determine if they were successful or unsuccessful. Because of the large amount of I've corrected all other errors that JsLint has shown, but these errors I can't seem to make any sense of, as the characters they reference are in the middle of words.

Here is the jsFiddle:

http://jsfiddle.net/UEKh6/10/

Error:
Problem at line 19 character 12: Missing semicolon.
var aContnt["<h1>Broken History - Dice roller tool</h1><p>Choose one of the f...

Problem at line 19 character 1249: Expected an assignment or function call and instead saw an expression.
var aContnt["<h1>Broken History - Dice roller tool</h1><p>Choose one of the f...

Implied global: prompt 64,66,262,264,441, morale 441,443, iRoll 442,443

Upvotes: 0

Views: 91

Answers (1)

rlemon
rlemon

Reputation: 17666

you need a = sign between the start of your array and the variable declaration.

var aContnt = ["

http://jsfiddle.net/rlemon/UEKh6/14/ see with added =

Upvotes: 5

Related Questions