+ Reply to Thread
Results 1 to 8 of 8

Thread: Command.Auction.Bid Failing

  1. #1
    Soulwalker
    Join Date
    Jan 2015
    Posts
    15

    Default Command.Auction.Bid Failing

    I'm trying to run Command.Auction.Bid as quickly as possible but I'm finding that the bid is failing (as per the callbackfunction I've got running).

    I imagine that it's being throttled, but it's hard to tell exactly how to check for it. Inspect.Queue.Status gives the following keys: auction, auctionanalyze, auctionfullscan, bulk, global, message and storage.

    The global number seems to go down from 100 during execution, however, when it returns true, which should indicate that it's no longer throttled, but the auctions still fail. I've tried coding against "auction" and "global" but neither seem to return the right data.

    Does anyone have any tips? Thanks!

    Hugh

  2. #2
    Shield of Telara Adelea's Avatar
    Join Date
    Mar 2011
    Posts
    734

    Default

    In my experience you always get an Event.Auction.Scan after placing a bid witha type value of 'bids'

    So, could you process your bids in a loop where you use a status flag, and change the value when you place the bid and then reset it in the Scan handler?
    http://forums.riftgame.com/image.php?type=sigpic&userid=125779&dateline=13553  38065

  3. #3
    Soulwalker
    Join Date
    Jan 2015
    Posts
    15

    Default

    That's a good idea. I'll try that in an hour or so and post back to see if that's the case.

    As a side discussion, the callback function on the Bid takes a pair of parameters, "failure" and "message". I can tell that the bid has failed because "failure" is true (or not false, anyway - see below for a questionable snippet) but "message" is always nil. Based on the snippet below, maybe it's "failure" that has the message in it and it's just evaluating to true.

    Code:
    local str = "not false"
    if str then
    print("not false evaluates to true!")
    end

  4. #4
    Soulwalker
    Join Date
    Jan 2015
    Posts
    15

    Default

    So after some tinkering, I got it to work. My Event.Auction.Scan handler looks like this because I found it can show up "weird" (null, empty or not "bids"):
    Code:
    local function HandleEventAuctionScan(aType, auctions)
    if aType == nil or next(aType) == nil or aType.type == "bids" then
    skipWhileTrue = false
    else
    skipWhileTrue = true
    end
    end
    But it works - no more failing auction bids! Mission accomplished, much obliged!

  5. #5
    Shield of Telara Adelea's Avatar
    Join Date
    Mar 2011
    Posts
    734

    Default

    Are you misssing a parameter on your handler?

    Code:
    function AS.Event_Auction_Scan(h,t,a)
    	print("AS.Event_Auction_Scan: "..tostring(t.type))
    end
    
    Command.Event.Attach(Event.Auction.Scan, AS.Event_Auction_Scan, "Event.Auction.Scan")
    That would explain why you never see the type!
    http://forums.riftgame.com/image.php?type=sigpic&userid=125779&dateline=13553  38065

  6. #6
    Soulwalker
    Join Date
    Jan 2015
    Posts
    15

    Default

    Oh, that's right. Events always pass a "handle" parameter first, right? So if an event says it returns two variables, it's actually the handle, plus the next two?

  7. #7
    Shield of Telara Adelea's Avatar
    Join Date
    Mar 2011
    Posts
    734

    Default

    Correct.

    In the old days, when we used table.insert() rather than Command.Event.Attach() the handler didnt exist, so most documentation out there doesnt take this into account.
    http://forums.riftgame.com/image.php?type=sigpic&userid=125779&dateline=13553  38065

  8. #8
    Soulwalker
    Join Date
    Jan 2015
    Posts
    15

    Default

    Awesome - thanks so much for the tips and suggestions. Now that I've stopped trying to evaluate the handler, the .type is showing up nicely and all is well in my world.

    I have noticed that there is a lot of older documentation floating around that FEELS like it's relevant but probably isn't.

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts