SHARE
TWEET

Untitled

a guest Oct 21st, 2019 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Code:
  2.  
  3. // Check that the achievement hasn't been claimed before.
  4. ChilliConnect.Logger.info(achievementsUserData);
  5. ChilliConnect.Logger.info(idToClaim.toString());
  6. ChilliConnect.Logger.info(achievementsUserData[idToClaim.toString()]);
  7.        
  8. for(var i in achievementsUserData)
  9. {
  10.     ChilliConnect.Logger.info(i);
  11. }
  12.        
  13. if (achievementsUserData[idToClaim.toString()].completiondate != "0")
  14.     return false;
  15.  
  16. Output:
  17. 1   {"2210":{"progress":0,"completiondate":"0"},"2211":{"progress":1,"completiondate":"Mon Oct 21 2019"},"2212":{"progress":1,"completiondate":"0"},"2216":{"progress":1,"completiondate":"0"},"2220":{"progress":0,"completiondate":"0"}}
  18. 2   "2211"
  19. 3   null
  20. 4   "$2210"
  21. 5   "$2211"
  22. 6   "$2212"
  23. 7   "$2216"
  24. 8   "$2220"
  25. 9   "An Error has occured."
  26. 10  "Error:TypeError: Cannot read property 'completiondate' of undefined"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top