Fix print not working
This commit is contained in:
parent
29813a599c
commit
a1a3cc61cb
@ -26,7 +26,7 @@ namespace ChaosBot.Services.ProgrammingLanguageInterpreter
|
||||
|
||||
MethodInfo printMethod = GetType().GetMethod("Print", BindingFlags.NonPublic | BindingFlags.Instance);
|
||||
LoggingFacade.Info($"Overwriting print function with {printMethod}");
|
||||
_state["print"] = printMethod;
|
||||
_state["print"] = _state.RegisterFunction("print", this, printMethod);
|
||||
|
||||
LoggingFacade.Trace("Disabling Lua `import` function");
|
||||
_state.DoString ("\nimport = function () end\n");
|
||||
@ -51,9 +51,9 @@ namespace ChaosBot.Services.ProgrammingLanguageInterpreter
|
||||
// ReSharper disable once UnusedMember.Local
|
||||
private void Print(params object[] parameters)
|
||||
{
|
||||
string str = string.Join(" ", from param in parameters select param == null ? string.Empty : param.ToString());
|
||||
string str = string.Join("\t", from param in parameters select param == null ? string.Empty : param.ToString());
|
||||
|
||||
_outputBuilder.Append(str);
|
||||
_outputBuilder.AppendLine(str);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user