it should work.
There are some ways to improve this though:
- Use a array to store the numbers
- Dont use "Yes" for a comparison, but "YES" instead combined with upper$()
- Replace print&input with input only
`Dice Roller Module for Jordan Hill's RPG Client
`Programmed by: Jordan Hill
begin:
RANDOMIZE TIMER()
PRINT "Welcome to the Dice Roller Module"
INPUT "Enter how many dice you want to roll: ", NumberOfDice
INPUT "How many sides do you want to have on each die: ", NumberOfSides
PRINT "Rolling..."
WAIT 2000
Dim Numbers(NumberOfDice)
For N = 1 To NumberOfDice
Numbers(N) = RND(NumberOfSides)
PRINT Numbers(N)
Next N
FinishRolling(NumberOfDice)
End
Function FinishRolling(NumberOfDice)
Input "Are you done rolling: ", Answer$
If upper$(Answer$)="YES" or upper$(Answer$)="Y"
Print "Thank you for rolling with the Dice Roller Module."
Wait 5000
Else
Undim Numbers(NumberOfDice)
Goto begin
Endif
Endfunction