PROBLEMA CON LOS IF

crislinux
08 de Marzo del 2009
PORQUE AL LLEGAR LA VARIABLE GLOBAL "PAS1"..HASTA 2 ME MUESTRA LA IMAGEN 1 Y ME DEBERIA MOSTRAR LA 3..Y DEPUES LA 4
PRIMERO ME MUESTRA LA UNO..BIEN
DESPUES ME MUESTRA LA DOS ..BIEN
DESPUES LA 1...MAL
DESPUES LA 1..MAL..

Y VERIFIQUE LA VARIABLE PAS1..Y REALMENTE ESTA FUNCIONANDO PAS1=1
PAS1=2
PAS1=3
PAS1=4...PERO LA IMAGEN NO CAMBIA..AYUDA PORFAVOR
' Gambas class file
PUBLIC sum AS Float = 0
PUBLIC sum1 AS Float = 0
PUBLIC pas2 AS Float
PUBLIC pas1 AS Float = 0
PUBLIC SUB sig_Click()
IF pas1 == 1 THEN
f2.Picture = Picture.Load("/home/cris/programas visual basic/juego/pictures/cara1.jpg")
f1.Picture = Picture.Load("/home/cris/programas visual basic/juego/pictures/5.jpg")
pas1 = pas1 + 1
ty.Text = pas1
ELSE
IF pas1 == 2 THEN
f2.Picture = Picture.Load("/home/cris/programas visual basic/juego/pictures/cara1.jpg")
f1.Picture = Picture.Load("/home/cris/programas visual basic/juego/pictures/8.jpg")
pas1 = pas1 + 1
ty.Text = pas1
ELSE
IF pas1 == 3 THEN
f2.Picture = Picture.Load("/home/cris/programas visual basic/juego/pictures/cara1.jpg")
f1.Picture = Picture.Load("/home/cris/programas visual basic/juego/pictures/11.jpg")
pas1 = pas1 + 1
ELSE
IF pas1 == 4 THEN
f2.Picture = Picture.Load("/home/cris/programas visual basic/juego/pictures/cara1.jpg")
f1.Picture = Picture.Load("/home/cris/programas visual basic/juego/pictures/1.jpg")
pas1 = pas1 + 1
ENDIF
ENDIF
ENDIF
ENDIF
END
PUBLIC SUB may_Click()
IF pas2 == 1 THEN
pas2 = pas2 + 1
f2.Picture = Picture.Load("/home/cris/programas visual basic/juego/pictures/3.jpg")
sum = sum + 1
pt2.Text = sum
ELSE
IF pas2 == 2 THEN
pas2 = pas2 + 1
f2.Picture = Picture.Load("/home/cris/programas visual basic/juego/pictures/10.jpg")
sum1 = sum1 + 1
pt1.Text = sum1
ELSE
IF pas2 == 3 THEN
pas2 = pas2 + 1
f2.Picture = Picture.Load("/home/cris/programas visual basic/juego/pictures/2.jpg")
sum1 = sum1 + 1
pt1.Text = sum1
ELSE
IF pas2 == 4 THEN
pas2 = pas2 + 1
f2.Picture = Picture.Load("/home/cris/programas visual basic/juego/pictures/12.jpg")
sum = sum + 1
pt2.Text = sum
ENDIF
ENDIF
ENDIF
ENDIF
END
PUBLIC SUB men_Click()
IF pas2 == 1 THEN
pas2 = pas2 + 1
f2.Picture = Picture.Load("/home/cris/programas visual basic/juego/pictures/3.jpg")
sum1 = sum1 + 1
pt1.Text = sum1
ELSE
IF pas2 == 2 THEN
pas2 = pas2 + 1
f2.Picture = Picture.Load("/home/cris/programas visual basic/juego/pictures/10.jpg")
sum = sum + 1
pt2.Text = sum
ELSE
IF pas2 == 3 THEN
pas2 = pas2 + 1
f2.Picture = Picture.Load("/home/cris/programas visual basic/juego/pictures/2.jpg")
sum = sum + 1
pt2.Text = sum
ELSE
IF pas2 == 4 THEN
pas2 = pas2 + 1
f2.Picture = Picture.Load("/home/cris/programas visual basic/juego/pictures/12.jpg")
sum1 = sum1 + 1
pt1.Text = sum1
ENDIF
ENDIF
ENDIF
ENDIF
END