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:
parent
9344816bd6
commit
581f950e10
5 changed files with 48 additions and 8 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue