09.12.2009, 15:01
You'll have problems if you are near the end of a month. Imagine it's 28 of november, the membership would expire the 24 of november.
To check if a player's membership is expired, you should first check if the saved month and the current one are the same. If they are, then check the day. If they aren't, you'll have to figure out a way to know how many days passed since the start of the month and the day from the previous from which the player joined.
Also remember that in new year, the old month may be 12, and the new one may be 1, which is smaller than 12.
To check if a player's membership is expired, you should first check if the saved month and the current one are the same. If they are, then check the day. If they aren't, you'll have to figure out a way to know how many days passed since the start of the month and the day from the previous from which the player joined.
Also remember that in new year, the old month may be 12, and the new one may be 1, which is smaller than 12.