I am working on a simple script that will take a "snapshot" of all of the attributes within a given campaign and make it so that you can reset all of the attributes back to that point later- essentially, savestates within Roll20. Here is my script as it stands: on('chat:message', function(msg) { if (msg.type != 'api') return; var parts = msg.content.split(' '); var command = parts.shift().substring(1); var objs = []; var objstates = []; var divstyle = 'style="width: 189px; border: 1px solid #353535; background-color: #f3f3f3; padding: 5px; color: #353535;"' var tablestyle = 'style="text-align:center; margin: 0 auto; border-collapse: collapse; margin-top: 5px; border-radius: 2px"'; var headstyle = 'style="color: #f3f3f3; font-size: 18px; text-align: left; font-variant: small-caps; background-color: #353535; padding: 4px; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;"'; var namestyle = 'style="background-color: #353535; color: #f3f3f3; text-align: center; font-weight: bold; overflow: hidden; margin: 4px; margin-right: 0px; border-radius: 10px; font-family: Helvetica, Arial, sans-serif;"' var wrapperstyle = 'style="display: inline-block; padding:2px;"' var statdiv = 'style="border: 1px solid #353535; border-radius: 5px; overflow: hidden; text-align: center; display: inline-block; margin-left: 4px;"' var cellabel = 'style="background-color: #353535; color: #f3f3f3; font-weight: bold; padding: 2px;"' //save if (command == 'savestate') { //grab objs objs = findObjs({type: "attribute"}); log(objs) //grab obj states for (var i in objs){ objstates[i] = objs[i].get("current") } sendChat("System", '/w gm <div ' + divstyle + '>' + //-- '<div ' + headstyle + '>Mystery</div>' + //-- '<div style = "margin: 0 auto; width: 80%; margin-top: 4px;">' + //-- '<p style = "margin-bottom: 0px;"> State saved! </p>' + //-- '</div>' + //-- '</div>' + //-- "[Load state](!&#"+"13;!loadstate " + objs + objstates + ")" ); } if (command == 'loadstate') { log("States gotten!") } }); My problem is that the actual array for objects always gets converted into [Object object], which doesn't work at all when I'm trying to get the actual objects once the second command is typed in. Is there some way to pass in the objs array to the command button while still retaining all of the individual objects within?