This is my code in batch:
:Dice
set /a roll=(%random% %% 6) + 1
set /a on=%on%+%roll%
if %on%>19 goto DiceOver19
if %on%<20 goto Camp1_1
I'm trying to make a monopoly and i have almost everything setup. I've been trying to figure this out but i just cant. Everything goes fine until i select "Roll the dice". ^^Above is the code for the dice.
The program just exits as soon as i go to Dice, can someone help?
EDIT: Fixed, now works fine.
Despite you having solved your own problem with the help of comments, I have added this reply which although technically not a direct response to your question includes a comparison operator and a standard roll loop which allows for a roll again feature in the event of rolling a double six. (I hope it at least benefits others)
Note this is for information only.