ScriptInterpreter::run_script(std::istream& in, const std::string& sourcename,
bool remove_when_terminated)
{
- printf("Stackbefore:\n");
- print_squirrel_stack(v);
if(sq_compile(v, squirrel_read_char, &in, sourcename.c_str(), true) < 0)
throw Scripting::SquirrelError(v, "Couldn't parse script");
if(remove_when_terminated) {
remove_me();
}
- printf("ended.\n");
// remove closure from stack
sq_pop(v, 1);
}
- printf("After:\n");
- print_squirrel_stack(v);
}
void