Reference error: math not defined [solved]


I keep getting an error where it says i haven't defined the variable totalDamage to 0. Even though my code has defined it. here is my code

var slaying = true;
var youHit = math.floor(math.random()*2);
var damageThisRound = math.floor(math.random()*5+1);
var totalDamage = 0;

is this a bug?


Hey @yusrighouse! Its not a bug. Notice all your math are lower case. Its suppose to be uppercase like this:



Oooooooh. Okay fixed my prob. Thanks.