Jump to content
MakeWebGames

Bank Xfer bug ??


Hendrickson

Recommended Posts

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 by Hendrickson
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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 by Hendrickson
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...