bestowFreeItem() and I don't have item until refresh?

1 posts (showing 1-1)
iggyvolz

Market Level 0Community Level 1
42 posts

I am trying to use bestowFreeItem() to give the user an item, but it is not being awarded, despite the fact that bestowFreeItem() returns true (I assume that means a success?) and my item is free.  I isolated the issue in one script:

[as3]
package {
  import flash.display.Sprite;
  import flash.text.TextField;
  public class IsolateProblem extends Sprite
  {
    public var text:TextField=new TextField();
    public function IsolateProblem():void
    {
      text.type='dynamic';
      text.width=550;
      text.height=400;
      addChild(text);
      new GamerSafe(this);
      GamerSafe.api.addEventListener(GamerSafe.EVT_LOGIN, onLogin);
    }
    public function onLogin(e:*):void
    {
      text.appendText("Preparing to bestow ITEM_NUMBER_0, with ID #"+GamerSafeConstants.ITEM_NUMBER_0+"\n");
      text.appendText(GamerSafe.api.hasItem(GamerSafeConstants.ITEM_NUMBER_0)?"You have item.\n":"You do not have item.\n");
      text.appendText(GamerSafe.api.bestowFreeItem(GamerSafeConstants.ITEM_NUMBER_0)?"Bestow succeeded.\n":"Bestow failed.\n");
      text.appendText(GamerSafe.api.hasItem(GamerSafeConstants.ITEM_NUMBER_0)?"You have item.\n":"You do not have item.\n");
    }
  }
}
[/as3]

 

Which returns:

[code]
Preparing to bestow ITEM_NUMBER_0, with ID #977
You do not have item.
Bestow succeeded.
You do not have item.[/code]

However, if I log in to the same test account that was used in that transaction, I get:

[as3]
Preparing to bestow ITEM_NUMBER_0, with ID #977
You have item.
Bestow succeeded.
You have item.[/as3]

So I have to ask the user to refresh the page before they have the item in their possession?  Or am I supposed to run some sort of refresh function?

I later tried checking every frame if I had the item in the swf where I bestowed the item, however it always said "You do not have item."  I also tried checking for all events sent by GamerSafe but nothing relating to the bestowment was sent (besides mouseovers, login, INUSE, et cetera).

posted 2014-07-28T23:13:51-07:00