mi sapreste aiutare?
1) if($rand<=$prob) //questo funziona
2) elseif($rand>=$prob) //questo funziona
3) elseif($rand == 1) //non funziona
4) elseif($rand == 100) //non funziona
thx
mi sapreste aiutare?
1) if($rand<=$prob) //questo funziona
2) elseif($rand>=$prob) //questo funziona
3) elseif($rand == 1) //non funziona
4) elseif($rand == 100) //non funziona
thx
http://codecanyon.net/category/all?ref=Manuelandro
And I bet she told a million people that she'd stay in touch, Well all the little promises they dont mean much,When theres
memories to be made
Che significa che non funziona...
ti da TRUE anche se $rand != da 1 o da 100?
Fai un echo $rand..... e sai quel che mangi...
![]()
Il silenzio è spesso la cosa migliore. Pensa ... è gratis.
nel senso che se è verificata una delle due prima condizioni il codice seguente funziona...
se invece una delle due condizioni finali dovrebbe essere verificata, non lo è perchè parte il codice di una delle 2 prime condizioni!!
http://codecanyon.net/category/all?ref=Manuelandro
And I bet she told a million people that she'd stay in touch, Well all the little promises they dont mean much,When theres
memories to be made
se $rand è uguale a 1 mi esce "hai colpito"!!Codice PHP:
if($rand<=$prob) { echo"<font color='red'>Hai colpito!!!</font>"; }
elseif($rand>=$prob) { echo"<font color='red'>Colpo andato a vuoto</font>"; }
elseif($rand == 1) { echo"<font color='red'>Supercolpo!!!</font>"; }
elseif($rand == 100) { echo"<font color='red'>Hai lisciato.</font>";
se $rand è uguale a 100 mi esce "colpo andato a vuoto"!!
http://codecanyon.net/category/all?ref=Manuelandro
And I bet she told a million people that she'd stay in touch, Well all the little promises they dont mean much,When theres
memories to be made
Con le prime due condizioni saturi tutto l'intervallo numerico... Prova a invertire l'ordine e a verificare prima i valori numerici e all'ultimo le diseguaglianze.![]()
I'm your dreams, make you real... I'm your eyes when you must steel...I'm pain when you can't feel...sad but true !
funzia!!
grezie!
http://codecanyon.net/category/all?ref=Manuelandro
And I bet she told a million people that she'd stay in touch, Well all the little promises they dont mean much,When theres
memories to be made