Thanks Guys!!! Got it all running, re read up on If statements to make sure i get em!!
Im know this is poor layout etc... but it just helps me get to grips with it this is my first code so here we go after fixing it up we have
Rem Project: Tester
Rem Created: 3/8/2008 12:49:24 PM
Rem ***** Main Source File *****
Randomize Timer():
Dice=Rnd(7)+1:
Dice2=Rnd(7)+1:
CLS
Print "Please Enter Player One Name: ";
Input Name$
Print "Please Enter Player Two Name: ";
Input Name2$
CLS
POne:
Print "Hello ";Name$
Print "It is your turn to roll the dice (Y/N)?"
Repeat: Rem Repeat... loop repeats until Y or N key is pressed
I$=Upper$(Inkey$()): Rem Read the keyboard for keypresses
Until I$="Y" or I$="N"
If I$="Y": Rem If Y was pressed
Print "You rolled a:"
Print Dice:
Sleep 2000
Goto PTwoguess:
Else
Goto close:
Endif
POneguess:
Print "Hello ";Name$
Print "Will you roll higher or lower (H/L)?"
Repeat:
I$=Upper$(Inkey$()):
Until I$="H" or I$="L"
If I$="H" Then Goto POnerollH:
If I$="L" Then Goto POnerollL:
POnerollH:
Print "You rolled a:"
Print Dice2:
Sleep 2000
If Dice1 > Dice2
Print "Congratulations!! You Guessed Right!"
Sleep 500
Goto POne:
Else
Print "Unlucky"
Print "Commencing Next Round"
Goto POne:
Endif
POnerollL:
Print "You rolled a:"
Print Dice1:
Sleep 2000
If Dice1 < Dice2
Print "Congratulations!! You Guessed Right!"
Sleep 500
Goto POne:
Else
Print "Unlucky"
Print "Commencing Next Round"
Goto POne:
Endif
PTwo:
Print "Hello ";Name2$
Print "It is your turn to roll the dice (Y/N)?"
Repeat: Rem Repeat... loop repeats until Y or N key is pressed
I$=Upper$(Inkey$()): Rem Read the keyboard for keypresses
Until I$="Y" or I$="N"
If I$="Y": Rem If Y was pressed
Print "You rolled a:"
Print Dice:
Sleep 2000
Goto POneguess:
Else
Goto close:
Endif
PTwoguess:
Print "Hello ";Name2$
Print "Will you roll higher or lower (H/L)?"
Repeat:
I$=Upper$(Inkey$()):
Until I$="H" or I$="L"
If I$="H" Then Goto PTworollH:
If I$="L" Then Goto PTworollL:
PTworollH:
Print "You rolled a:"
Print Dice2:
Sleep 2000
If Dice2 > Dice1
Print "Congratulations!! You Guessed Right!"
Sleep 500
Goto PTwo:
Else
Print "Unlucky"
Print "Commencing Next Round"
Goto PTwo:
Endif
PTworollL:
Print "You rolled a:"
Print Dice2:
Sleep 2000
If Dice2 < Dice1
Print "Congratulations!! You Guessed Right!"
Sleep 500
Goto PTwo:
Else
Print "Unlucky"
Print "Commencing Next Round"
Goto PTwo:
Endif
close:
Print "Thanks For Playing"
Sleep 1000
End: Rem End the program
It all works but for some strange reason this
PTworollL:
Print "You rolled a:"
Print Dice2:
Sleep 2000
If Dice2 < Dice1
Print "Congratulations!! You Guessed Right!"
Sleep 500
Goto PTwo:
Else
Print "Unlucky"
Print "Commencing Next Round"
Goto PTwo:
Endif
Still shows up as Unlucky Commnecing Next Round when getting a lower number than player one
Please help
Thanks
Zen
"Face it, if crime didnt pay there would be very few criminals."
Laughton Lewis Burdock