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

random scripting work-in-progress

This commit is contained in:
Perttu Ahola 2011-11-11 20:50:09 +02:00
parent f8430723e0
commit a6a1e6ed1a
7 changed files with 55 additions and 24 deletions

View file

@ -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