Skip to content

Commit f14fec6

Browse files
committed
Convert LuaLog() and ErrorLog() to pcstr instead of LPCSTR
Add "LUA: " in lua output, so that I can somehow navigate in the log mess
1 parent 7b30bdd commit f14fec6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/xrScriptEngine/ScriptEngineScript.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
#include "Include/xrAPI/xrAPI.h"
1515
#include "ScriptExporter.hpp"
1616

17-
void LuaLog(LPCSTR caMessage)
17+
void LuaLog(pcstr caMessage)
1818
{
1919
if (!GlobalEnv.ScriptEngine->m_stack_is_ready)
20-
Log(caMessage); // Xottab_DUTY: temporary workaround to get lua log output
20+
Msg("LUA: %s", caMessage); // Xottab_DUTY: temporary workaround to get lua log output
2121

2222
#ifndef MASTER_GOLD
2323
GlobalEnv.ScriptEngine->script_log(LuaMessageType::Message, "%s", caMessage);
@@ -28,10 +28,10 @@ void LuaLog(LPCSTR caMessage)
2828
#endif
2929
}
3030

31-
void ErrorLog(LPCSTR caMessage)
31+
void ErrorLog(pcstr caMessage)
3232
{
3333
if (!GlobalEnv.ScriptEngine->m_stack_is_ready)
34-
Log(caMessage); // Xottab_DUTY: temporary workaround to get lua error output
34+
Msg("LUA Error: %s", caMessage); // Xottab_DUTY: temporary workaround to get lua error output
3535

3636
GlobalEnv.ScriptEngine->error_log("%s", caMessage);
3737
#ifdef DEBUG
@@ -85,7 +85,7 @@ inline int bit_xor(const int i, const int j) { return i ^ j; }
8585
inline int bit_not(const int i) { return ~i; }
8686
inline const char* user_name() { return Core.UserName; }
8787

88-
void prefetch_module(LPCSTR file_name) { GlobalEnv.ScriptEngine->process_file(file_name); }
88+
void prefetch_module(pcstr file_name) { GlobalEnv.ScriptEngine->process_file(file_name); }
8989

9090
struct profile_timer_script
9191
{

0 commit comments

Comments
 (0)