GiGs said: plat here is an attribute object, not a numerical value. You need to get the attribute's current value, and convert it to a number. You could use plat. get ( "current" ) Or as an alternative to getting the objects at the start of the script, you could use getAttributeByname to get their values directly, and create the objects only when you want to update the character sheet. e.g. var plat = getAttrByName( cWho.id, 'PP'); So then would this work? if (plat.get("current") < amount) Or would I have to save it as another variable? GiGs said: I'd like to first mention, Aaron's script earlier is a drop in replacement that will handle all the currency conversions, and get rid of all the special case handling you're using for plat, gold, etc. I understand that Aaron has a script has conversions in it. Not to discredit Aaron in any way, my players want the conversions to happen in a specific order and I want there to be as little user input as possible. That's why I have these conversion checks written the way they are. Due to my lack of experience, I have absolutely zero understanding of Aaron's conversion code. That's why I haven't even attempted to implement it. I'm not trying to be rude or hard-headed. I'm overjoyed at your help, but some things are a bit over my head at the moment, but I'm sure I'll get there with enough time. The Aaron said: I didn't see where you're using it, but the Javascript Spread Operator is only partially implemented in the Roll20 API sandbox. You can use it with Arrays, but not Objects. I'm not completely sure what you're referencing. I did a quick google search of "Javascript Spread Operator" and I'm pretty sure I'm not using it. Should I be? If so, why? Where I'm at in my goals for this script : Before I do any more development on the commands, I need to get what I currently have into a functional state for testing. This is my #1 priority right now, because if we don't get that resolved I can't fully test and resolve other issues. To reiterate the issue, nothing seems to happen in my script. It seems to not recognize that a chat even has passed. I've added log("Event that should be happening"); lines into the script for debugging purposes, but none of them appear in the API console. Perhaps taking a step back and making a very simple script that responds to "on:chat" with a "sendChat" line is necessary? That way I more fully understand how to write it, and potentially figure out why nothing is happening in my script. I know that there's already "on:chat" code in my script, but once again that was borrowed from DXWarlock.