diff --git a/src/include/script.h b/src/include/script.h index a5890e65c..91f969349 100644 --- a/src/include/script.h +++ b/src/include/script.h @@ -68,7 +68,7 @@ enum { extern lua_State *Lua; -extern int LuaLoadFile(const std::string &file); +extern int LuaLoadFile(const std::string &file, const std::string &strArg = ""); extern int LuaCall(int narg, int clear, bool exitOnError = true); #define LuaError(l, args) \ @@ -310,8 +310,7 @@ extern bool LuaToBoolean(lua_State *l, int index, int subIndex); extern void LuaGarbageCollect(); /// Perform garbage collection extern void InitLua(); /// Initialise Lua -extern void LoadCcl(const std::string &filename, const std::string &luaArgStr); /// Load ccl config file -extern void LoadCcl(const std::string &filename); /// Load ccl config file +extern void LoadCcl(const std::string &filename, const std::string &luaArgStr = ""); /// Load ccl config file extern void SavePreferences(); /// Save user preferences extern int CclCommand(const std::string &command, bool exitOnError = true); diff --git a/src/network/netconnect.cpp b/src/network/netconnect.cpp index f911daf46..12eb9c1c8 100644 --- a/src/network/netconnect.cpp +++ b/src/network/netconnect.cpp @@ -1507,7 +1507,7 @@ void NetworkServerStartGame() } } -#if 0 +#ifdef DEBUG printf("INITIAL ServerSetupState:\n"); for (int i = 0; i < PlayerMax - 1; ++i) { printf("%02d: CO: %d Race: %d Host: ", i, ServerSetupState.CompOpt[i], ServerSetupState.Race[i]); diff --git a/src/stratagus/script.cpp b/src/stratagus/script.cpp index 91c22d5f6..120805a0a 100644 --- a/src/stratagus/script.cpp +++ b/src/stratagus/script.cpp @@ -232,18 +232,6 @@ int LuaLoadFile(const std::string &file, const std::string &strArg) return status; } -/** -** Load a file and execute it -** -** @param file File to load and execute -** -** @return 0 for success, else exit. -*/ -int LuaLoadFile(const std::string &file) -{ - return LuaLoadFile(file, std::string()); -} - /** ** Save preferences ** @@ -2419,11 +2407,6 @@ void LoadCcl(const std::string &filename, const std::string &luaArgStr) LuaGarbageCollect(); } -void LoadCcl(const std::string &filename) -{ - LoadCcl(filename, std::string()); -} - void ScriptRegister() { AliasRegister();