ok i figured that for my game to actually function i was gonna have to study the hows and why's about the material you posted for me about my dice game! that led me to try and rewrite my player selection so it wasn't alot of unnecessary code (although that version works!!!) here is what it did look like:
playerselection:
Cls
Input "How many players "; nop
If nop = 1 Then
Print "You cant Play by yourself Joe!!!"
Print "(press any key)"
Sleep
Goto playerselection
Elseif nop = 2 Then
Goto p2
Elseif nop = 3 Then
Goto p3
Elseif nop = 4 Then
Goto p4
Elseif nop = 5 Then
Goto p5
Elseif nop = 6 Then
Goto p6
End If
p2:
Cls
Input "Player one enter your name:", p1n
Cls
Input "Player two enter your name:", p2n
Cls
Goto game
p3:
Cls
Input "Player one enter your name:", p1n
Cls
Input "Player two enter your name:", p2n
Cls
Input "Player three enter your name:", p3n
Cls
Goto game
p4:
Cls
Input "Player one enter your name:", p1n
Cls
Input "Player two enter your name:", p2n
Cls
Input "Player three enter your name:", p3n
Cls
Input "Player four enter your name:", p4n
Cls
Goto game
p5:
Cls
Input "Player one enter your name:", p1n
Cls
Input "Player two enter your name:", p2n
Cls
Input "Player three enter your name:", p3n
Cls
Input "Player four enter your name:", p4n
Cls
Input "Player five enter your name:", p5n
Cls
Goto game
p6:
Cls
Input "Player one enter your name:", p1n
Cls
Input "Player two enter your name:", p2n
Cls
Input "Player three enter your name:", p3n
Cls
Input "Player four enter your name:", p4n
Cls
Input "Player five enter your name:", p5n
Cls
Input "Player six enter your name:", p6n
Cls
Goto game
game:
Print p1n; " rolls first"
Print
Print
Print "Press any key to roll"
Sleep
and that works but i wanted to try a do….loop and see if it could accomplish the same things (for both reasons: educational and sloth!) and here is what i came up with:
Dim Shared As String pn(6)
dim nop as integer
playerselect:
Cls
Input "how many players"; nop
If nop > 1 And nop < 7 Then
Goto entername
Elseif nop = 1 Then
Print "you cant play by yourself"
print "(press any key to continue)"
sleep
Goto playerselect
else
print "Please enter a number 1 - 6"
print "(press any key to continue)"
sleep
goto playerselect
End If
entername:
cls
do
for a = 1 to 6
print "Player "; a
input "please enter your name"; pn(a)
next a
loop until a = nop
sleep
but it doesnt work like that i guess or is there some mis-type in my code?