- 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?