excluir numeros de la funcion Rnd(x,y)?

Iniciado por marrison, 1 Mayo 2013, 20:39 PM

0 Miembros y 1 Visitante están viendo este tema.

Miseryk

Yo usualmente uso una función que tiene un juego llamado Argentum Online:

Código (vb) [Seleccionar]

Public Function RandomNumber(ByVal LowerBound As Long, ByVal UpperBound As Long) As Long
    'Initialize randomizer
    Randomize Timer
   
    'Generate random number
    RandomNumber = (UpperBound - LowerBound) * Rnd + LowerBound
End Function


Se usa como: var = RandomNumber(1,9)
Can you see it?
The worst is over
The monsters in my head are scared of love
Fallen people listen up! It's never too late to change our luck
So, don't let them steal your light
Don't let them break your stride
There is light on the other side
And you'll see all the raindrops falling behind
Make it out tonight
it's a revolution

CL!!!