aboutsummaryrefslogtreecommitdiff
path: root/src/server.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-12-02 22:49:54 +0200
committerPerttu Ahola <celeron55@gmail.com>2011-12-02 22:49:54 +0200
commit581f950e10b40f2af4ede56c3fa78f13eccb610b (patch)
tree5efd4bd3b304edb7e850cf2ffb8803439513385b /src/server.cpp
parent9344816bd6c40603729256b454e2f171902b02e5 (diff)
downloadhax-minetest-server-581f950e10b40f2af4ede56c3fa78f13eccb610b.tar.gz
hax-minetest-server-581f950e10b40f2af4ede56c3fa78f13eccb610b.zip
Fix script error reporting a bit
Diffstat (limited to '')
-rw-r--r--src/server.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server.cpp b/src/server.cpp
index b8bdd8830..e345d8811 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -982,7 +982,7 @@ Server::Server(
if(!success){
errorstream<<"Server: Failed to load and run "
<<builtinpath<<std::endl;
- assert(0);
+ exit(1);
}
// Load and run "mod" scripts
core::list<ModSpec> mods = getMods(m_modspaths);
@@ -991,11 +991,11 @@ Server::Server(
ModSpec mod = *i;
infostream<<"Server: Loading mod \""<<mod.name<<"\""<<std::endl;
std::string scriptpath = mod.path + DIR_DELIM + "init.lua";
- bool success = script_load(m_lua, scriptpath.c_str());
+ bool success = scriptapi_loadmod(m_lua, scriptpath, mod.name);
if(!success){
errorstream<<"Server: Failed to load and run "
<<scriptpath<<std::endl;
- assert(0);
+ exit(1);
}
}