What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

getAuctionBuyList bug or how to fix?

Status
Not open for further replies.

005

New Member
Joined
Oct 29, 2014
Messages
4
Reaction score
0
Like many of the API calls getAuctionBuyList Method states that "In the case of false returns one of the following errors" however it is impossible that this method can ever return a bool due to it returning AuctionItem or null.

Code:
List<AuctionItem> items = getAuctionBuyList(req, 0);

if (items == false) {
  Log(DateTime.Now.ToShortTimeString() + " ERROR: " + GetLastError().ToString());
}

This causes a compile error as items must be AuctionItem and cannot be a bool.

Can you please patch or suggest what is being done wrong?
 
try do this

I have tried this:

Code:
List<AuctionItem> items = getAuctionBuyList(req, 0);

if (items == null) {
  Log(DateTime.Now.ToShortTimeString() + " ERROR: " + GetLastError().ToString());
  return;
}

// rest of the code

The bug I have is I sometimes get a List that has `items.Count` of 0, when I know for a fact there is Items in that category on the auction house I am searching. That is what I'm trying to fix. So I wanted to add in some error checking, but what the API states I cannot do.
 
In case if auc list return 0 items- there i no GetLastError related to this method, its just server answer with 0 items (lag\ignore\or something else related to server).
 
In case if auc list return 0 items- there i no GetLastError related to this method, its just server answer with 0 items (lag\ignore\or something else related to server).

Okay that's what I was thinking. It is just server's fault/lag and there is no way to error check this correct?
 
It is just server's fault/lag and there is no way to error check this correct?
It is just server's fault/lag. Check items.Count > 0?
 
It is just server's fault/lag. Check items.Count > 0?

I need to check if items.Count == 0 and because of the server's fault/lag it runs code that should not be run, creating false positives.
 
Status
Not open for further replies.
Back
Top