Hello
I was scripting a GUI and for the button handling I made this function:
function buttonHandling()
outputDebugString("test1")
local input = guiGetText(GUIEditor.edit[1])
if (source == GUIEditor.button[1]) then
guiSetText(GUIEditor.edit[1], input.."1")
outputDebugString("test2")
elseif (source == GUIeditor.button[9]) then
guiSetText(GUIEditor.edit[1], input.."2")
elseif (source == GUIeditor.button[8]) then
guiSetText(GUIEditor.edit[1], input.."3")
elseif (source == GUIeditor.button[8]) then
guiSetText(GUIEditor.edit[1], input.."4")
elseif (source == GUIeditor.button[7]) then
guiSetText(GUIEditor.edit[1], input.."5")
elseif (source == GUIeditor.button[6]) then
guiSetText(GUIEditor.edit[1], input.."6")
elseif (source == GUIeditor.button[5]) then
guiSetText(GUIEditor.edit[1], input.."7")
elseif (source == GUIeditor.button[4]) then
guiSetText(GUIEditor.edit[1], input.."8")
elseif (source == GUIeditor.button[3]) then
guiSetText(GUIEditor.edit[1], input.."9")
elseif (source == GUIeditor.button[2]) then
guiSetText(GUIEditor.edit[1], input.."0")
end
end
addEventHandler("OnClientGUIClick", root, buttonHandling)
But it doesn't work, the outputDebugString are not popping up in my /debugscript. I can't find out what's wrong with this and I'm 100% sure that all GUIelements are the right ones (the ones after source ==)
Is it becuase I set it on read only? Or shouldn't that be a problem?