Hi,
I have an problem, I use lua (for reloger) and if the player name use an special char I have an lua error.
I have try much possibility, and this not work all time
Sample:
Memory.Memory.MyHook.Memory.WriteBytes(DoStringArg_Codecave, Encoding.UTF8.GetBytes(command));
If you have any ideas.
Thank
---------- Post added at 05:46 AM ---------- Previous post was at 05:02 AM ----------
I have find an solution:
Code:
string t = "";
foreach (var b in Encoding.UTF8.GetBytes("härà k"))
{
if (t != "")
t = t + ", ";
t = t + Convert.ToInt32(b);
}
string playerName = "string.char(" + t + ")";
Lua.LuaDoString("print(" + playerName + ");");
// playerName == string.char(72, 195, 164, 114, 195, 160, 107) == härà k