diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-11-11 20:50:09 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-11-29 19:13:39 +0200 |
commit | a6a1e6ed1a8de1294970a5af6ba992c38d4022b8 (patch) | |
tree | f16285a594a3b55a3353e7fb97b2a22b56eed3ea /src/server.cpp | |
parent | f8430723e0c2d13470e430af2e4f4be5e64f82f3 (diff) | |
download | minetest-a6a1e6ed1a8de1294970a5af6ba992c38d4022b8.tar.gz minetest-a6a1e6ed1a8de1294970a5af6ba992c38d4022b8.tar.bz2 minetest-a6a1e6ed1a8de1294970a5af6ba992c38d4022b8.zip |
random scripting work-in-progress
Diffstat (limited to 'src/server.cpp')
-rw-r--r-- | src/server.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/server.cpp b/src/server.cpp index 1c5d8d937..82671bf89 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -989,8 +989,14 @@ Server::Server( // Export API scriptapi_export(m_lua, this); // Load and run scripts - script_load(m_lua, (porting::path_data + DIR_DELIM + "scripts" - + DIR_DELIM + "default.lua").c_str()); + std::string defaultscript = porting::path_data + DIR_DELIM + + "scripts" + DIR_DELIM + "default.lua"; + bool success = script_load(m_lua, defaultscript.c_str()); + if(!success){ + errorstream<<"Server: Failed to load and run " + <<defaultscript<<std::endl; + assert(0); + } // Initialize Environment |