Hendrickson Posted April 20, 2012 Share Posted April 20, 2012 (edited) Has anyone struck an issue when sometime not always, but bank money is transferred from one user to the other they receive the event but not the cash. Its even logged in the xfer logs.. It seems to happen randomly and I can't figure it out....Puzzling, would server load have something to do with this? Edited April 20, 2012 by Hendrickson Quote Link to comment Share on other sites More sharing options...
rulerofzu Posted April 20, 2012 Share Posted April 20, 2012 Possible if your server load is high and the script failed before it executed the query. Unlikely though. Are you sending the event before the query? if so place the event after the query that way if the player is getting the event the query must have executed. Of course you could also see if its your players taking the **** and send an event to yourself logging the transaction or record it into a log. I think bank transfers are logged anyway? Quote Link to comment Share on other sites More sharing options...
Hendrickson Posted April 20, 2012 Author Share Posted April 20, 2012 (edited) Thanks I did think the players were taking the **** but now a few others claiim the same issue. The server load has high when this happened. And the event is logged after the queries so I dont know. Its been working fine in my tests. Could server load really do that? $db->query("UPDATE users SET money=money-{$_POST['money']} WHERE userid=$userid"); $db->query("UPDATE users SET money=money+{$_POST['money']} WHERE userid={$_GET['ID']}"); print "You sent \${$_POST['money']} to ID {$_GET['ID']}."; event_add($_GET['ID'],"You received \${$_POST['money']} from {$ir['username']}.",$c); $msg="You received \${$_POST['money']} from {$ir['username']}."; sms_send($msg,$_GET['ID']); $it=$db->query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid={$_GET['ID']}"); $er=$db->fetch_row($it); $db->query("INSERT INTO cashxferlogs VALUES ('', $userid, {$_GET['ID']}, {$_POST['money']}, unix_timestamp(), '{$ir['lastip']}', '{$er['lastip']}')"); } Edited April 20, 2012 by Hendrickson Quote Link to comment Share on other sites More sharing options...
rulerofzu Posted April 20, 2012 Share Posted April 20, 2012 I would do what I suggested move the event to the bottom and do an event to yourself. Really only way to be sure. Quote Link to comment Share on other sites More sharing options...
Hendrickson Posted April 20, 2012 Author Share Posted April 20, 2012 Ok, ive tested it countless times now and 100% working .Its either players talking #@$! or server lag. But i'm thinking its players trying to scam others. Thanks for your help Quote Link to comment Share on other sites More sharing options...
rulerofzu Posted April 20, 2012 Share Posted April 20, 2012 Even with server lag the script unless its stating on the page to your players its not executing (script timeout) then it would run. Add an event for yourself at the end and then when someone tries it let them know they are taking the **** Quote Link to comment Share on other sites More sharing options...
Hendrickson Posted April 20, 2012 Author Share Posted April 20, 2012 Ok, ive tested it countless times now and 100% working .Its either players talking #@$! or server lag. But i'm thinking its players trying to scam others. Thanks for your help Quote Link to comment 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.