View Single Post
  #1  
Old 04-05-2016, 08:47 AM
RestlessThoughts's Avatar
RestlessThoughts RestlessThoughts is offline
Member
 
Join Date: Mar 2016
Posts: 10
Gender: Female
Credits: 1,333
RestlessThoughts is on a distinguished road
Default :)

The main issue is that even though you update the table to be 0, $mysidia->user->beltanegrab still holds the old, original value. So you're updating the table to 0, then setting it back to the old value + 1.

So the easiest patch would be to set $mysidia->user->beltanegrab to 0 when you update the table to be 0. Then the next check of $mysidia->user->beltanegrab later down the script will be correctly reset and allow players to continue.
PHP Code:
if ($mysidia->user->bellastday != $today) { 
        
$mysidia->db->update("users", array("beltanegrab" => (0)), "username = '{$mysidia->user->username}'");
       
$mysidia->user->beltanegrab 0;         
    } 
__________________
Reply With Quote