Iank1968 Posted February 17, 2009 Share Posted February 17, 2009 I made a login program that allows players to get a specific log in every 3 hours, but it when a player goes on an adventure it calculates the login every single time. Can someone help me with this code please. function NewRegularInterval ($user) { //print "congrats 3 hour interval"; ?> <fb success message="Thanks for playing, you have been given EO$ 25 for logging in." /> <? global $users_table; Query ("UPDATE $users_table SET regular_intervals = regular_intervals + 1, last_logon_credit = NOW() WHERE uid=$user"); return GetRegularIntervals ($user); } function NewBonusInterval ($user, $num) { //print "congrats 3 hour interval"; ?> the log in is supose to be calculated every 3 hours not every adventure lol Thanks in advance for your help Sorry about not using the [ code ] before Quote Link to comment https://forums.phpfreaks.com/topic/145654-having-problems-with-a-login-program-i-created-part-2/ Share on other sites More sharing options...
radar Posted February 17, 2009 Share Posted February 17, 2009 of the code you provided, the only thing I see wrong is that there isn't a } before the ?> to close the NewBonusInterval function. Other than that, can't help you much -- cause the code provided doesnt match the issue you've given. Quote Link to comment https://forums.phpfreaks.com/topic/145654-having-problems-with-a-login-program-i-created-part-2/#findComment-764667 Share on other sites More sharing options...
Iank1968 Posted February 18, 2009 Author Share Posted February 18, 2009 could not closing the function cause it to count over and over again instead of every 3 hours? Quote Link to comment https://forums.phpfreaks.com/topic/145654-having-problems-with-a-login-program-i-created-part-2/#findComment-764722 Share on other sites More sharing options...
allworknoplay Posted February 18, 2009 Share Posted February 18, 2009 could not closing the function cause it to count over and over again instead of every 3 hours? Ummm what????? Quote Link to comment https://forums.phpfreaks.com/topic/145654-having-problems-with-a-login-program-i-created-part-2/#findComment-764724 Share on other sites More sharing options...
Iank1968 Posted February 18, 2009 Author Share Posted February 18, 2009 obviously im missing code here lol. I will post the code I have for the log in Quote Link to comment https://forums.phpfreaks.com/topic/145654-having-problems-with-a-login-program-i-created-part-2/#findComment-764800 Share on other sites More sharing options...
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.