I am porting some of my utility scripts from my Castle & Crusades game to a D&D 5E game and am seeing a strange issue. The one I am working on is my mass initiative script. It is working properly on my C&C game but I am getting an error - ReferenceError: getCharacterObj is not defined so I am a bit perplexed as to why this is happening. Here is the top portion of the code, with the line of code failing marked with *** function rollSelectedInitiative(selectedToken) { Campaign().set('initiativepage',false) var tokenType = selectedToken._type var tokenID = selectedToken._id var tokenObj = getObj("graphic", tokenID) var tokenPageID = tokenObj.get('pageid') *** var characterObj = getCharacterObj(selectedToken) var characterRace = getAttrByName(characterObj.id,'Race','current') var characterHP = parseInt(tokenObj.get('bar1_value'),10) var InitiativeMod = InitiativeMod = parseInt(getAttrByName(characterObj.id,'initiative_bonus','current'),10) var turnOrder var initRoll = randomInteger(20)*1