Beginner problem - incompatible types: possible lossy conversion from double to int

No description
5 Replies
JavaBot
JavaBot10mo ago
This post has been reserved for your question.
Hey @OtáviobzDuplo! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
dan1st
dan1st10mo ago
Math.floor gives you a double you need to cast it to int rooms[(int)(Math.random()*rooms.length)]
OtáviobzDuplo
OtáviobzDuploOP10mo ago
Thanks
JavaBot
JavaBot10mo ago
If you are finished with your post, please close it. If you are not, please ignore this message. Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
JavaBot
JavaBot10mo ago
Post Closed
This post has been closed by <@701256802821734413>.
Want results from more Discord servers?
Add your server