the problem occurs in compiling when it reaches a line using the maths system of java.
choice = (Math.round(Math.random()*100));
this line keeps coming up with the error in compiling saying "possible loss of precision"
ive looked around on the internet for a solution to this, but the most i could find was people saying to change the variable to a floating interger or double. i have tried both of these to no avail as it will get past that line, then freeze on the next line where the variable choice is used again.
Question
FiShMaStEr
the problem occurs in compiling when it reaches a line using the maths system of java.
this line keeps coming up with the error in compiling saying "possible loss of precision"
ive looked around on the internet for a solution to this, but the most i could find was people saying to change the variable to a floating interger or double. i have tried both of these to no avail as it will get past that line, then freeze on the next line where the variable choice is used again.
any clues?
if more of the code is needed to help just ask.
Link to comment
Share on other sites
9 answers to this question
Recommended Posts