i used iHook do luastring successfully,but i can't get the lua return like this
Lua_DoString(@"(function()
local d1, d2, d3
if (GlueDialog:IsShown()) then
d1 = GlueDialog.which
d2 = GlueDialogText:GetText()
if (GlueDialogHTML:IsShown()) then
d3 = 'html'
end
else
if (TOSFrame:IsShown()) then
d1 = string.lower(TOSFrame.noticeType)
local scrollbar = _G[TOSFrame.noticeType .. 'ScrollFrameScrollBar'];
if (scrollbar:IsShown()) then
local min, max = scrollbar:GetMinMaxValues()
scrollbar:SetValue(max)
end
end
end
return CURRENT_GLUE_SCREEN, CURRENT_GLUE_PENDING, d1, d2, d3, IsConnectedToServer()
end)()");
CurrentGlueScreen = Lua_GetLocalizedText(0);
string PendingScreen = Lua_GetLocalizedText(1);
CurrentGlueDialog = Lua_GetLocalizedText(2);
string DialogText = Lua_GetLocalizedText(3);
string d3 = Lua_GetLocalizedText(4);
string Connected = Lua_GetLocalizedText(5);
can any1 tell why?
---------- Post added at 06:23 AM ---------- Previous post was at 06:22 AM ----------
Hook.DoString("d2 = GlueDialogText:GetText()");
Console.WriteLine("Value: " + Hook.GetLocalizedText("d2"));
it's my code with iHook,but client crashed