mirror of
https://github.com/edubart/otclient.git
synced 2025-10-19 05:53:26 +02:00
fix some keyboard issues, chat tab, fix loadScript exception
This commit is contained in:
@@ -297,9 +297,13 @@ void LuaInterface::loadScript(const std::string& fileName)
|
||||
if(!boost::starts_with(fileName, "/"))
|
||||
filePath = getCurrentSourcePath() + "/" + filePath;
|
||||
|
||||
std::string buffer = g_resources.loadFile(filePath);
|
||||
std::string source = "@" + filePath;
|
||||
loadBuffer(buffer, source);
|
||||
try {
|
||||
std::string buffer = g_resources.loadFile(filePath);
|
||||
std::string source = "@" + filePath;
|
||||
loadBuffer(buffer, source);
|
||||
} catch(Exception& e) {
|
||||
throw LuaException(e.what());
|
||||
}
|
||||
}
|
||||
|
||||
void LuaInterface::loadFunction(const std::string& buffer, const std::string& source)
|
||||
|
Reference in New Issue
Block a user