I believe you're having the Firebase.child crash, not a crash related to which field you are setting. Try this version: on("chat:message", function (msg) {
'use strict';
var cmdName = "!test_char",
msgTxt = msg.content,
fixedCreateObj = (function () {
return function () {
var obj = createObj.apply(this, arguments);
if (obj && !obj.fbpath) {
obj.fbpath = obj.changed._fbpath.replace(/([^\/]*\/){4}/, "/");
}
return obj;
};
}());
// make the API shut up about avatar images even if none is provided...
if (!(msg.selected && msg.selected.length > 0)) {
log ("no token selected to given the character some silly image.");
return;
}
var token = getObj('graphic', msg.selected[0]._id);
if (msg.type === "api" && msgTxt.indexOf(cmdName) !== -1) {
log("check char bio");
var character = fixedCreateObj(createObj("character", {
avatar: token.get("imgsrc"),
name: "name1",
bio: "words1",
gmnotes: "",
archived: false,
inplayerjournals: "",
controlledby: ""
}));
/*
character.get('bio',function(bio){
log("bio is " + bio);
});
*/
log("set bio manually..");
character.set('bio','words2');
}
});
Reference: Discussion of this bug and it's solution: Community Forums: [API] "Firebase.child failed" Error - Help Please! | Roll20 -- virtual tabletop gaming that tells a story