U
unba1300
Guest
Hi.
This is my first post, and I have much to learn. I have some experience programming with Visual Basic, but B4A is new to me. I've read the entire Beginner's Guide and many posts here, but can't seem to figure out this simple problem...
I want to create a one dimension array of people's names and have the program pick one at random, and then assign that to a variable. I also want the user to be able to change the names in the array and have that input stored. This first part was working fine in VB...
Dim varPeople() As String = {"David Jones", "John Doe", "Lady Gaga"}
Dim i As Int
i = Rnd(0, 2)
varPerson = varPeople(i)
But results in a syntax error in V4B.
And I've tried many different variations of the above without success.
Can someone help? Thanks.
This is my first post, and I have much to learn. I have some experience programming with Visual Basic, but B4A is new to me. I've read the entire Beginner's Guide and many posts here, but can't seem to figure out this simple problem...
I want to create a one dimension array of people's names and have the program pick one at random, and then assign that to a variable. I also want the user to be able to change the names in the array and have that input stored. This first part was working fine in VB...
Dim varPeople() As String = {"David Jones", "John Doe", "Lady Gaga"}
Dim i As Int
i = Rnd(0, 2)
varPerson = varPeople(i)
But results in a syntax error in V4B.
And I've tried many different variations of the above without success.
Can someone help? Thanks.