1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

Fix script error reporting a bit

This commit is contained in:
Perttu Ahola 2011-12-02 22:49:54 +02:00
parent 9344816bd6
commit 581f950e10
5 changed files with 48 additions and 8 deletions

View file

@ -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);
}
}