icecoldchillin Posted February 2, 2011 Posted February 2, 2011 They look like they should be in a cron or global function or something ect....My vote "no" for the header. :thumbsup: lol Quote
bluegman991 Posted February 3, 2011 Posted February 3, 2011 $Auction = $db->query("SELECT `ID`,`SellerID`,`ItemID`,`CurrentBid`,`Time`,`TimeLeft` FROM `gAuction` WHERE (`Time` - ".time()." + `TimeLeft` < 1)"); while($Auction2 = $db->fetch_row($Auction)) { $AuctionBids = $db->query("SELECT `ID`,`aID`,`BidderID`,`CurrentBid2` FROM `gAuctionBids` WHERE (`aID` = ".$Auction2['ID'].")"); $atime = $Auction2['Time'] - time() + $Auction2['TimeLeft']; if($atime < 1 && !$db->num_rows($AuctionBids)) { event_add($Auction2['SellerID'],'Your auction finished without any bids.'); $db->query("INSERT INTO `inventory` VALUES ('',".$Auction2['ItemID'].",".$Auction2['SellerID'].",1)"); $db->query("DELETE FROM `gAuction` WHERE (`ID` = ".$Auction2['ID'].")"); } elseif($atime < 1 && $db->num_rows($AuctionBids)) { $AuctionBids = $db->fetch_row($AuctionBids); event_add($Auction2['SellerID'],'Your auction has finished, the maximum bid was $'.number_format($Auction2['CurrentBid']).''); event_add($AuctionBids['BidderID'], 'You\'ve won the auction!'); $db->query("UPDATE `users` SET `money` = `money` + ".abs(intval($Auction2['CurrentBid']))." WHERE (`userid` = ".$Auction2['SellerID'].")"); $db->query("INSERT INTO `inventory` VALUES ('',".$Auction2['ItemID'].",".$AuctionBids['BidderID'].",1)"); $db->query("DELETE FROM `gAuction` WHERE (`ID` = ".$Auction2['ID'].")"); $db->query("DELETE FROM `gAuctionBids` WHERE (`aID` = ".$Auction2['ID'].")"); } } mainly what i found was instead of putting "$db->" you put "$db>" i also took out any unnecessary coding that was not needed for v2 Quote
mr_shuu Posted February 3, 2011 Posted February 3, 2011 Good call. Dropped Auctions from Header... it didnt belong there. I probably used two different mods, removed one and didnt clean up unneeded code it placed in the header... this Auctions works without header code. Good call! Missions might work, but it would not have a shot with db> so thanks for picking up on that. Quote
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.