|
| 24 Dec 2011 08:47 AM |
I'm making a decision maker with VB, and now I'm trying to get it to detect if a choice slot if empty or not. If it is, then don't add it in the table. If it isn't, put it in the table. When I try it out with one slot blank and one slot filled, and it chooses the blank one, the text becomes blank also. How would I make it so it only displays if the slot is filled?
Here is my code.
----------
Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim Choices(0 To 1) As String If TextBox1.Text <> "" Then Choices(0) = TextBox1.Text ElseIf TextBox2.Text <> "" Then Choices(1) = TextBox2.Text End If Dim randomArraySlot As New Random Label1.Text = Choices(randomArraySlot.Next(0, Choices.Length)) End Sub End Class
bon |
|
|
| Report Abuse |
|
|
|
| 24 Dec 2011 08:48 AM |
| This is entirely ROBLOX related in every aspect, obviously. |
|
|
| Report Abuse |
|
|
|
| 24 Dec 2011 08:50 AM |
| This is entirely ROBLOX related in every aspect, obviously. |
|
|
| Report Abuse |
|
|
|
| 24 Dec 2011 08:51 AM |
Oops, I thought I was in SH. lolsorry
bon |
|
|
| Report Abuse |
|
|
|
| 24 Dec 2011 08:52 AM |
| Thanks for making my head hurt with your weird scripting language. |
|
|
| Report Abuse |
|
|
| |
|
|
| 24 Dec 2011 08:53 AM |
| It actually is related, idiots. Why are you checking a blank form then outputting the results to an array? Or did I read too fast.. |
|
|
| Report Abuse |
|
|
| |
|