Ok, I am hooking lua_tostring now.
Are there really 11 Threads executing lua_tostring at a time or is it a logical problem ?
Code:
int HookLuaToString(void* luastate, int index, size_t* length)
{
if(do_string)
{
DoLuaString(luastringtoexec.c_str(), luastringtoexec.c_str(), NULL);
do_string = false;
}
return TrueLuaToString(luastate, index, length);
}
.....
if(action == "printHScount")
{
luastringtoexec = "print(GetItemCount(6948))";
do_string = true;
}
That code is printing the number to chat 11 times.