Thread: Snaplinks
View Single Post
  #14  
Old 11-13-2011, 02:15 PM
Csar Csar is offline
Member
 
Join Date: Oct 2011
Posts: 7
Gender: Male
Credits: 786
Csar is on a distinguished road
Default

Quote:
Originally Posted by TheShadow View Post
Which is why I'm inclined to think it's not a server issue. It's now starting to affect adopts getting clicks as well, so pretty much everything is breaking down :c
Maybe the problem is caused by mysql queues... Just try this:

Go to levelup.php [145] there should be 2 lines like this:

PHP Code:
    $newamount $GLOBALS['money'] + $reward;
    
runquery("UPDATE {$GLOBALS['prefix']}users SET `money` = '{$newamount}' WHERE `username` = '{$loggedinname}'"); 
Try replacing with this:
PHP Code:
    $newamount $GLOBALS['money'] + $reward;
    
runquery("UPDATE {$GLOBALS['prefix']}users SET `money` = `money`+{$reward} WHERE `username` = '{$loggedinname}'"); 
This will probably cause Mysql to just increase instead of overwriting. Worth a try?

EDIT: Is money a string? If so it'll probably not work... Hope it isn't like this. Otherwise you'll have to try adding a field that is called "lock" and that is changed to 1 at the beginning of the script and changed to 0 at the end. We'll also have to add some code to detect if the lock is activated and "sleep" 0.1 seconds and repeat the query...

Last edited by Csar; 11-13-2011 at 02:18 PM.
Reply With Quote