View Single Post
  #1  
Old 08-11-2005, 03:08 PM
shai shai is offline
Member
 
Join Date: Oct 2004
Posts: 29
problem with input boxes

Hi,

I ran the following program on two different computers with input of 1 and on both Vizard 2.5 opened two input boxes instead of one.

I thought that it might be an integer and string issue but after reading the help pages on viz.input ("The return value will be a string unless the value is a proper number, in which case a number will be returned. ") I realized that this cant be the problem.

when running, enter as input 1 and then since 1 > 5 is not true it should never get into the while loop.

any ideas what's going wrong?

dominic

Program:
-----------
import viz

viz.go()
h = 1
h = viz.input("enter the number of human players: ")

while (h>5):
print "max of players is 5"
h = viz.input("enter the number of human players: ")

viz.quit()
Reply With Quote