JohnPony Posted October 17, 2012 Author Share Posted October 17, 2012 There are a few key elements left out this, such as error checking, as of now there doesn't seem to be any extreme bugs that i haven't patched, even if you download the source you still need to head over to the second post which contains a few key elements to prevent further errors.On the topic of the log, that is meant to log any auctions that could not find the player who was the previous bid participant. Meaning his account was most likely deleted, i never got a chance to test it out myself so i'm not sure if that even works.I also added in the bug fix from the second post for the BidOnItem, and i will update the addon module files for people who follow the tutorial later on today.The new compiled project will be up in about 15 minutes, and the new modules later today. Link to comment Share on other sites More sharing options...
JohnPony Posted October 18, 2012 Author Share Posted October 18, 2012 For anyone who does not already have it, add:```Private Sub HandleGetAuctions(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long) Call SendAuctions(Index)End Sub``` Link to comment Share on other sites More sharing options...
Slasheree Posted October 18, 2012 Share Posted October 18, 2012 $hit, reminded that my currency is item 2… gonna fix that later and tell if it clears the errors Link to comment Share on other sites More sharing options...
JohnPony Posted October 18, 2012 Author Share Posted October 18, 2012 If you changed the currency number, make sure you changed it for everything or it will cause some errors.Later today when i get home I'll make it a bit simpler with a constant. Link to comment Share on other sites More sharing options...
Slasheree Posted October 18, 2012 Share Posted October 18, 2012 > If you changed the currency number, make sure you changed it for everything or it will cause some errors.> > Later today when i get home I'll make it a bit simpler with a constant.Yes, I changed the whole engine to work with item 2 as currency. but forgot for the auction system XD Link to comment Share on other sites More sharing options...
merunes Posted October 18, 2012 Share Posted October 18, 2012 Great tutorial thanks for putting this online, was searching for something like that, but i got a Bug.~~If someone sells an Item, the selled item dont get removed from his Inventory, neither he gets the Money they buyer pays for the Item.~~ [Fixed]If someone Buys an item, the Currency he Pays, is given back to him after he Wons the Auction + the Seller dont get any currency at all.p.s.A nice feature would be if the Auctionmenu was only acessable via a NPC, a Sign or something like that. Link to comment Share on other sites More sharing options...
Slasheree Posted October 18, 2012 Share Posted October 18, 2012 Shouldn't the Call AddLog thing have the PLAYER_LOG instead of " " ?Call AddLog("Auction Failed To Find A Player And Return " & Bid & " To Them!", PLAYER_LOG)[EDIT]Can you actually give 0 amount of item to the player ? O.oCall GiveInvItem(Index, Auction(AuctionNum).Item, 0, True) Link to comment Share on other sites More sharing options...
Murdoc Posted October 18, 2012 Share Posted October 18, 2012 -snip- Link to comment Share on other sites More sharing options...
Slasheree Posted October 18, 2012 Share Posted October 18, 2012 I get and error with the ClearMemory in Sub GivePrevBid ._.Ertzel what engine are you using ? Link to comment Share on other sites More sharing options...
Ertzel Posted October 18, 2012 Share Posted October 18, 2012 ummm… I didn't use this tutorial in any engine. The one in the download is one using 3.0 since it has the old GUI but the only thing that would change is the button on the game screen to open the auction form client side.But what your error is in, is part of modAuction client side. So either you edited it and ducked it up or didn't add modAuction to your server correctly. Link to comment Share on other sites More sharing options...
Slasheree Posted October 18, 2012 Share Posted October 18, 2012 It gives me subscript out of range when I buy something that already has a bid on it (probably calls Sub GivePrevBid ), and it highlights the Sub ClearPlayer… Link to comment Share on other sites More sharing options...
Whackeddie99 Posted October 18, 2012 Share Posted October 18, 2012 Guys calm down, General will sort out the problems! He's just not the best at putting everything online, trust me, when you write a big system it's hard not to forget things. And to be honest, if you can't figure out these problems yourself, you shouldn't be making a game with it! Simple as that. Link to comment Share on other sites More sharing options...
Slasheree Posted October 18, 2012 Share Posted October 18, 2012 > Guys calm down, General will sort out the problems! He's just not the best at putting everything online, trust me, when you write a big system it's hard not to forget things. And to be honest, if you can't figure out these problems yourself, you shouldn't be making a game with it! Simple as that.You're the one who need to calm down XD, I'm like Zen over here ![:P](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/tongue.png) and I'm just telling these errors so that General knows what errors are occouring (even if he does know they occour) Link to comment Share on other sites More sharing options...
Ertzel Posted October 18, 2012 Share Posted October 18, 2012 > It gives me subscript out of range when I buy something that already has a bid on it (probably calls Sub GivePrevBid ), and it highlights the Sub ClearPlayer…Again, you've added something wrong or missed something because it works in the compiled version.Either wait until Gen fixes up the tutorial to include everything or rip it properly out from the compiled version yourself. Link to comment Share on other sites More sharing options...
Slasheree Posted October 18, 2012 Share Posted October 18, 2012 uhh, we're messing with a badass over here XDD Link to comment Share on other sites More sharing options...
Slasheree Posted October 18, 2012 Share Posted October 18, 2012 > Again, you've added something wrong or missed something because it works in the compiled version.> > Either wait until Gen fixes up the tutorial to include everything or rip it properly out from the compiled version yourself.As I said, I'm using CS:DE, I did everything as asked and I even had to edit the DrawGDI thingy[EDIT] I also added a GDI thing when you are buying, so people can see what the duck they are buying XD Link to comment Share on other sites More sharing options...
merunes Posted October 18, 2012 Share Posted October 18, 2012 I tested it with the Full installed version, but there it also dont work. Money for the Auction is not given to the Seller.Real bug and not just me failing at following a Tutorial. Link to comment Share on other sites More sharing options...
JohnPony Posted October 18, 2012 Author Share Posted October 18, 2012 The money part is my fault, i will have that added in right away.Give me a few moments, as for the Subscript problems, let me check that out. I haven't ever had it occur but i may just be able to reproduce the problem. Link to comment Share on other sites More sharing options...
JohnPony Posted October 18, 2012 Author Share Posted October 18, 2012 Anyone who has already begun the tutorial, add the following things to modAuctions server side.```Private Sub AuctionSoldOut(ByVal AuctionNum As Long, ByVal Name As String)Dim i As LongDim Filename As StringDim F As LongDim PlayerName As Stringi = Player_HighIndex + 3Call ClearPlayer(i)Filename = App.path & "\data\accounts\" & Trim(Name) & ".bin"F = FreeFileOpen Filename For Binary As #FGet #F, , Player(i)Close #FPlayer(i).Money = Auction(AuctionNum).BidFilename = App.path & "\data\accounts\" & Trim(Name) & ".bin"F = FreeFileOpen Filename For Binary As #FPut #F, , Player(i)Close #FCall ClearPlayer(i)End Sub```And in BidOnAuction replace the previous bid procedure with this:```' Lets check if we won!If Bid >= Auction(AuctionNum).MaxBid ThenCall PlayerMsg(Index, "You Have Won " & Trim$(Item(Auction(AuctionNum).Item).Name) & " !", Red)Call GiveInvItem(Index, Auction(AuctionNum).Item, 0, True)If SellerIndex <> 0 ThenCall GiveInvItem(SellerIndex, 1, Auction(AuctionNum).Bid, True)Call PlayerMsg(SellerIndex, "Your auction has sold!", Red)ElseCall AuctionSoldOut(AuctionNum, Auction(AuctionNum).Owner)End IfCall DestroyAuction(AuctionNum)Call SendAuctionsElse' We are not quite there yet ;DCall PlayerMsg(Index, "You Are " & Auction(AuctionNum).MaxBid - Bid & " Away from winning this auction!", Red)End If```Find``` If Player(Index).Money > 0 Then```in Sub JoinGame and replace it with:```If Player(Index).Money > 0 Then Call PlayerMsg(Index, "You Reieve Money From The Auction House!", Red) Call GiveInvItem(Index, 1, Player(Index).Money, True) Player(Index).Money = 0End If```If you find any further bugs, please notify me and i will fix them ASAP.I will be updating the compiled source and Addons momentarily.Edit:The compiled version and the addon's now have this fixed, Thanks for notifying me of the bug guys. Link to comment Share on other sites More sharing options...
Slasheree Posted October 18, 2012 Share Posted October 18, 2012 Subscript out of range when I 'outbid' myself (maybe another person will do the same error) and it takes me to this line:Call ZeroMemory(ByVal VarPtr(TempPlayer(Index)), LenB(TempPlayer(Index)))in```Sub ClearPlayer(ByVal Index As Long)Dim i As LongCall ZeroMemory(ByVal VarPtr(TempPlayer(Index)), LenB(TempPlayer(Index)))Set TempPlayer(Index).Buffer = New clsBufferCall ZeroMemory(ByVal VarPtr(Player(Index)), LenB(Player(Index)))Player(Index).Login = vbNullStringPlayer(Index).Password = vbNullStringPlayer(Index).Name = vbNullStringPlayer(Index).Class = 1frmServer.lvwInfo.ListItems(Index).SubItems(1) = vbNullStringfrmServer.lvwInfo.ListItems(Index).SubItems(2) = vbNullStringfrmServer.lvwInfo.ListItems(Index).SubItems(3) = vbNullStringEnd Sub```[EDIT] Used another account to outbid myself, still throws the error Link to comment Share on other sites More sharing options...
JohnPony Posted October 18, 2012 Author Share Posted October 18, 2012 I can't seem to be able to replicate the issue.Are you sure you have implemented everything correctly? Link to comment Share on other sites More sharing options...
Slasheree Posted October 18, 2012 Share Posted October 18, 2012 > I can't seem to be able to replicate the issue.> > Are you sure you have implemented everything correctly?Yes, I even rechecked to see if everything was equal (only thing I had to change was the GDI thing)Once again, I'm using CS:DE Link to comment Share on other sites More sharing options...
JohnPony Posted October 18, 2012 Author Share Posted October 18, 2012 I believe CS:DE loads and save to ini files, some things may differ.Do you have TeamViewer? If you do i will gladly help you implement it. Link to comment Share on other sites More sharing options...
Slasheree Posted October 18, 2012 Share Posted October 18, 2012 I don't have it in this pc, but what would you do ? have you found any solution ? Link to comment Share on other sites More sharing options...
JohnPony Posted October 18, 2012 Author Share Posted October 18, 2012 I don't happen to have the CS:DE project on hand, but you would need to manually save the new data, PM me your loading and saving player procedures. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now