Jump to content
MakeWebGames

Recommended Posts

Posted

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.

Posted

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.

  • 3 weeks later...
Posted
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.

Posted

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 ]

Posted

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 ]

Posted
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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...