Forum Multiplayer VaultNotLoaded

Discussion and help relating to the PlayerIO Multiplayer API.

VaultNotLoaded

Postby kChamp » April 13th, 2015, 6:06 pm

Here's a simplified version of my code:

Code: Select all
public bool LOADED = false;

public void Refresh(){
   client.PayVault.Refresh (delegate() {
      LOADED = true;
   });
}
   
public int gears{
   get{
      if(LOADED){
         return client.PayVault.Coins;
      }else{
         return 0;
      }
   }
}


This should only access 'client.PayVault.Coins' after the PayVault has successfully been refreshed, yet in my production ErrorLog, I see a few of the following errors: "VaultNotLoaded; Cannot access items before vault has been loaded. Please refresh the vault first."

Am I missing an edge case? Maybe I'm not allowed to access Coins while PayVault is being refreshed for a subsequent time?
kChamp
Paid Member
 
Posts: 9
Joined: July 5th, 2010, 7:44 pm

Return to Multiplayer



cron