Ver Mensaje Individual
  #6 (permalink)  
Antiguo 22/05/2004, 02:29
Avatar de PatomaS
PatomaS
Colaborador
 
Fecha de Ingreso: marzo-2004
Ubicación: En alguna otra parte
Mensajes: 4.656
Antigüedad: 21 años
Puntos: 63
Hola

Pues siguiendo con el ejemplo de 10 sonidos, sería algo así com oestol o que deberías poner en tus if:

if (x <= 1) x = sound1
else if (x = 2) x = sound2
else if (x = 3) x = sound3
else if (x = 4) x = sound4
else if (x = 5) x = sound5
else if (x = 6) x = sound6
else if (x = 7) x = sound7
else if (x = 8) x = sound8
else if (x = 9) x = sound9
else x = sound10

A mi me gusta más usar la estructura swithc que los else if, pero esa igual de buena.

Suerte

Felicidad
__________________
¡ hey, hou, hou, hey !