Bleh... not working: } else { // Token is linked to a journal entry var oCharacter = getObj("character", obj.get("represents")); var oTempHP = findObjs({_type: "attribute", name: "TempHP", _characterid: oCharacter.id})[0]; if (oTempHP.length == 0) { createObj("attribute", { name: "TempHP", current: 0, characterid: oCharacter.id }); }; var iTempHP = parseInt(oTempHP.get("current")); } This is the relevant portion of the script. When the script detects an on("change:token") event, it gives me this error if the token is linked to a journal and the journal does not have the TempHP attribute: For reference, the error message generated was: TypeError: Cannot read property 'length' of undefined at Sandbox.<anonymous> (evalmachine.<anonymous>:27:20) at eval ( If I remove the [0] at the end of the var oTempHP line, it gives me this error instead: For reference, the error message generated was: TypeError: Object has no method 'get' at Sandbox.<anonymous> (evalmachine.<anonymous>:34:34) at eval ( The second error happens whether or not the linked journal has the TempHP attribute... but if I put the [0] back and the token linked journal has TempHP on it, than I don't get any errors and the script works.