X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fscripting%2Ffunctions.cpp;h=236a12ad2ed21f1421a669cbae0e75bdcebbc7eb;hb=a113d3bd1feddd510e3b2852b0d42522735eee40;hp=5dd10ed714342209ad337ea1fdf94b9667033874;hpb=ff4c6994b952e26b854461d739eb3bcbfc30719f;p=supertux.git diff --git a/src/scripting/functions.cpp b/src/scripting/functions.cpp index 5dd10ed71..236a12ad2 100644 --- a/src/scripting/functions.cpp +++ b/src/scripting/functions.cpp @@ -131,11 +131,11 @@ static SQInteger squirrel_read_char(SQUserPointer file) void import(HSQUIRRELVM vm, const std::string& filename) { IFileStream in(filename); - + if(SQ_FAILED(sq_compile(vm, squirrel_read_char, &in, filename.c_str(), SQTrue))) throw SquirrelError(vm, "Couldn't parse script"); - + sq_pushroottable(vm); if(SQ_FAILED(sq_call(vm, 1, SQFalse, SQTrue))) { sq_pop(vm, 1); @@ -162,7 +162,7 @@ void debug_draw_solids_only(bool enable) void save_state() { using namespace WorldMapNS; - + if(World::current() == NULL) throw std::runtime_error("Can't save state without active World"); @@ -272,4 +272,3 @@ int rand() } } -