JAMESOMIGHTY Posted March 7, 2010 Posted March 7, 2010 you choose whether to go left or right in the maze, if you get it right your jackpot increases, if you get it wrong your jackpot reduces to 0, you can choose whether to gamble your money and possibly win more or just take it and leave. maze.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. sqls [mysql]ALTER TABLE users ADD mazeturns INT(11) DEFAULT 1; ALTER TABLE users ADD mjackpot INT(11) DEFAULT 10000;[/mysql] crons (cron_day.php) You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
Dayo Posted March 7, 2010 Posted March 7, 2010 just looked at the code not sure if this is right You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. plus ild advise you change this mt_rand is better then rand plus there is no need for two if statments just 1 if/else You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. to this You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
Joshua Posted March 28, 2010 Posted March 28, 2010 mt rand and rand arent as differant as one might think. Use either or it wont hurt yeh. Quote
Dave Posted March 28, 2010 Posted March 28, 2010 mt rand and rand arent as differant as one might think. Use either or it wont hurt yeh. mt_rand is faster then rand this is why it's better to use it. Quote
Joshua Posted March 28, 2010 Posted March 28, 2010 It all depends on the range of numbers It's a common misconception that mt_rand is faster than rand :D Quote
JAMESOMIGHTY Posted March 28, 2010 Author Posted March 28, 2010 heres a more secure version You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
Dave Posted April 4, 2010 Posted April 4, 2010 You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. That doesn't look right somehow? Quote
Zero-Affect Posted April 4, 2010 Posted April 4, 2010 It all depends on the range of numbers It's a common misconception that mt_rand is faster than rand :D Wonder where you got that idea *cough* helping hand with some code *cough*... Quote
Equinox Posted April 4, 2010 Posted April 4, 2010 I use mt_rand() purely because it's meant to be 4 times faster than rand()... . Oh, and HTML issues.....<font> has been deprecated, and naming the colour, for example "<font color = lime>" will fail a HTML test, you need to use the colour hash, like <font color = #8B0000> The correct HTML here would be: <span style = "color : #00FF00;"></span>[MSIE_newline_end ] Quote
Zero-Affect Posted April 4, 2010 Posted April 4, 2010 rand works on a lower upper value than mt_rand so really logically rand would be quicker right? Quote
Djkanna Posted April 5, 2010 Posted April 5, 2010 In this case rand() would do and actually may have a speed difference aswell. Quote
Equinox Posted April 6, 2010 Posted April 6, 2010 mt_rand() is faster and the randomness of numbers is better. It's perfectly acceptable in this case, yes. And they both do the EXACT same job here, yes. But mt_rand() would be faster by about .2 of a second. I'm not saying he's wrong in using rand() =p I'm purely saying mt_rand() is faster xD[MSIE_newline_end ] Quote
Djkanna Posted April 6, 2010 Posted April 6, 2010 mt_rand() is faster and the randomness of numbers is better. It's perfectly acceptable in this case, yes. And they both do the EXACT same job here, yes. But mt_rand() would be faster by about .2 of a second. I'm not saying he's wrong in using rand() =p I'm purely saying mt_rand() is faster xD[MSIE_newline_end ] Yeah but mt_rand on (1,2) is really not something you should be bothered about you can use either with very little unoticable differences. Where as if you had a higher max then sure mt_rand may be suitable. But in this case rand is perfectly suitable. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.