
I spent the last 2 days trying to figure out why the following (familiar to all) code snippet was giving undefined for oCharacter. selected, and oToken existed. _.each(selected, function(obj) { if (obj._type != "graphic") {return;}; var oToken = getObj("graphic", obj._id); var oCharacter = getObj("character", oToken.get("represents")); something_found = oCharacter.get("name"); }); Wrote rewrote read and reread cried and recried. What was happening was that I have not associated the token a character sheet. So there was nothing to "represents" the error was not in the code but in a misstep in setting up the tokens. I will add a check somewhere in there to hopefully catch this potential user error (me the user) in the future. Now I can move on to cry over other things.