#How to make an alphanumeric variable

5 messages · Page 1 of 1 (latest)

neon glen
#

I'm trying to make a little program that allows you to put in what dice you want to roll (D4, D6, etc) and then the program would roll that dice, but I'm running into a roadblock because when using java.util.Random it apparently doesn't allow you to use a string, it has to be an integer. So how could I make it where I can use the random util (Or if there is a different import I don't know about) so I can make this work? Any help is appreciated and I am very new to programming, thank you!

cosmic urchinBOT
#

This post has been reserved for your question.

Hey @neon glen! 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.

opal grail
#

what kind of random value do you want to pick

#

Random only does numbers because they're the most logical thing to randomize, you could randomize a string in a lot of different ways