First post, sorry if i'm doing this wrong.
var tierArray = [390, 520, 750, 975, 1350, 1820, 3250];
var rand = Math.floor((Math.random() * 6) + 1);
var rp;
var skinName = document.getElementById("skinName");
var skinRP = document.getElementById("skinRP");
var totalRP = document.getElementById("totalRP");
var totalMG = document.getElementById("totalMG");
var total = parseInt(totalRP.value);
var mg = parseInt(totalMG.value);
var array390, array520, array750, array975, array1350, array1820, array3250 = [];
var skinImg = document.getElementById("skin");
var activeArray;
function roll() {
mg += 490;
rp = tierArray[rand];
total += rp;
skinName.value = "hello";
skinRP.value = rp;
totalRP.value = total;
totalMG.value = mg;
}
My page worked before moving all my variables to a global scope so that they were usable to other methods, now they have been moved the code doesn't run, and my JSLint is not picking up a problem, am i missing something?