Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×

playerIsGM Always returns false

For some reason, when I loop through the list of players in a campaign and run playerIsGM for each of them, it returns false in every case, even though two of the players are flagged as GM. Any ideas? var players = findObjs({ type: 'player' });     log(players); //returns array of players     _.each(players, function(item, idx){         var id1 = item.get("id");         log(id1); //returns Id         log(playerIsGM(id1)); //returns false     });
1457282585
The Aaron
Pro
API Scripter
It only returns the current state for a player.  When a player is logged off, they are not a gm in the game, currently.  Ironically, this is the only way that playerIsGM() and my old isGM() script differ.  If you need to know that a player has been promoted to GM status, the only way to do it from the API is to keep track of what they were when they were logged in last, probably in the state.