Hi,
I wanted to form the input of the
user into an integer...
I used an entry-box:
# entry .psetup.q1a -width 3
after pressing "Ok", a procedure will start:
# button.psetup.bcont -text "OK" -command player_inputbox
..
# proc player_inputbox {} {
# set vari [.psetup.q1a get]
# if {$vari>6} then {
# label .psetup.error1 -text "Wrong, maximum of 6 Players"
# grid .psetup.error1 -row 2 -column 0
# }
..
# for {set j 0} {$j < 6} {incr j 1} {
# if {$vari==[expr$j+1]} then {
# des...
What's my mistake, I believe he works with
a string instead of a integer, because the
Error I get is the follow:
wrong # args: should be "for start test next command"
while compiling
"for {set j 0} {[expr $j] < [expr 6]} {incr j 1} {
if {$vari==[expr $j+1]} then {
destroy .psetup.q1a
destroy .psetup.bcont
..."
Can u help me ???
Sorry, I'm a newbie and my English isn't so good.
Thank you, Stefan
I wanted to form the input of the
user into an integer...
I used an entry-box:
# entry .psetup.q1a -width 3
after pressing "Ok", a procedure will start:
# button.psetup.bcont -text "OK" -command player_inputbox
..
# proc player_inputbox {} {
# set vari [.psetup.q1a get]
# if {$vari>6} then {
# label .psetup.error1 -text "Wrong, maximum of 6 Players"
# grid .psetup.error1 -row 2 -column 0
# }
..
# for {set j 0} {$j < 6} {incr j 1} {
# if {$vari==[expr$j+1]} then {
# des...
What's my mistake, I believe he works with
a string instead of a integer, because the
Error I get is the follow:
wrong # args: should be "for start test next command"
while compiling
"for {set j 0} {[expr $j] < [expr 6]} {incr j 1} {
if {$vari==[expr $j+1]} then {
destroy .psetup.q1a
destroy .psetup.bcont
..."
Can u help me ???
Sorry, I'm a newbie and my English isn't so good.
Thank you, Stefan