Good catch! Seems like there are some issues with getting function names and even references in 2.3 HTML5 right now. I've got confirmation that these are "known issues" and that a fix is coming both for script_get_name and... well, referencing global functions, which would be the next issue you ran into if your replaced script_get_name in treustate_create_state() with an empty string or whatever to bypass the error.
So, if you define your state scripts in the object itself rather than in a global state, it will work. If you are feeling crazy you could even write the state script right there were you create the state. Like this:
truestate_state_create(STATE_STAND, function(_event) {
switch(_event){
case TRUESTATE_NEW: break;
case TRUESTATE_STEP: break;
case TRUESTATE_DRAW: break;
}
}
etc. But all that really matters is that the function you reference isn't a "global" function.