-
November 29th, 2013, 01:15 PM
#1
[RESOLVED] choose smaller number from an array always "0"
I am writing a dice roller program with VB 2010 express that rolls many different types of dice and up to 15 of each type. I currently have 4 options on for the program. Choose how many dice, Choose how many sides on dice, Choose only the highest roll and choose only the lowest roll. Everything seems to be working as intended with the exception of the "Use lowest Die" code. If anyone can please point me into the right direction or give me an example of how to do it better. Thanks in advance for any help
Code:
Dim DiceArray(frmRoller.cmbNumberofdice.Text) As Long
Dim iTemp As Integer
Dim i As Integer
Dim numofDice As Integer
Dim CountArrayHigh(100) As Integer
Dim CountArrayLow(100) As Integer
numofDice = frmRoller.cmbNumberofdice.Text
Select Case frmRoller.cmbChooseDie.Text
Case "D4"
For i = 1 To numofDice
iTemp = D4()
DiceArray(i) = iTemp
If iTemp > CountArrayHigh(0) Then CountArrayHigh(0) = iTemp
If iTemp < CountArrayLow(0) Then CountArrayLow(0) = iTemp
Next i
highDie = CountArrayHigh(0)
lowDie = CountArrayLow(0)
-
November 29th, 2013, 02:10 PM
#2
Re: choose smaller number from an array always "0"
Never mind :-) figured it out.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|