Jump to content

Time


Ashoar

Recommended Posts

I am having a little bit of trouble that i am hoping someone can help me out with.

 

Ok i have a script that is connected too MYSQL.

The funtion of it is basicly that every 60 minutes 1 attack turn is added on too a users profile. This is so that they can attack another player in the game.

The only problem is that when logged in it is supposed too say:

"Next attack turn in (however many minutes)

 

Instead i get:

 

"Next attack turn in 0 minutes"

 

The time system does not seem too work, even if i wait 60 minutes another turn is not added to the users profile.

 

This is what i have on the MYSQL database for the time:

 

`time` int(11) NOT NULL default '0',

 

and in all the php pages that need it i use:

 

$time=time()-$conf["minutes_per_turn"]*60;

 

Can anyone help?

 

Thanks

 

So can anyone help me with my problem?

Link to comment
https://forums.phpfreaks.com/topic/121689-time/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.