Coding a daily reward

L

LPForever

Guest
I'm creating a game on android and iPhone. I would like to reward people when they play the game each day. I just want a simple thing like each time they play the game and a day or more has passed since the last time they get a reward. I'm stuck on how to code that I know there are variables for getting the day I just don't know how to code it to where it can keep track if it is the next day.
 
M

Mishtiff

Guest
figure out how to save it to a file.

pseudo code:
open game
read variable on file for date
if curDate - savedDate > 24 hours, allow reward
collect reward
set variable on file to current day/time
etc.
 
Top