This may be an easy one to answer. Problem Im having is I have an 'onchat' script that runs to give out money based on a !loot command they use when looting bodies to return random results, and apply it to a 'credits' attribute on the players character sheet. The issue is if they have thier name selected to chat as, vs character name the script throw a 'Cannot read property 'id' because of course the playername doesn't return anything it can use. causing the entire API sandbox to stop. My question, is there a way to do it so the code below returns the players character name, even if they forget to set it in the chat dropdown? I assume its to do with msg.who, just not sure what other to try to return the right name. (if it helps they only ever have one character they control..so it will never return more than 1 result if possible) var cWho = findObjs({_type: 'character',name: msg.who})[0]; var oC = findObjs({name: "Credits",_type: "attribute",_characterid: cWho.id}, {caseInsensitive: true})[0];