Turbesz Posted August 20, 2016 Share Posted August 20, 2016 (edited) why not working this? (sorry, but me very very noob "scripter") local GUIEditor = { button = {}, window = {}, memo = {} } local szoveg = {} GUIEditor.window[1] = guiCreateWindow(675, 322, 317, 305, "teszt panel", false) guiWindowSetSizable(GUIEditor.window[1], false) szoveg = guiCreateMemo(13, 23, 294, 223, "", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(33, 255, 257, 40, "ok", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") addEventHandler("onClientGUIClick", GUIEditor.button[1], outputChatBox("Szöveg "..szoveg.." még szöveg") ) and... ERROR: xy.lua:15: attempt to concatenate global 'szoveg' (a userdata value) Edited August 21, 2016 by Guest Link to comment
!#NssoR_) Posted August 20, 2016 Share Posted August 20, 2016 what do you want to do ? Link to comment
roaddog Posted August 20, 2016 Share Posted August 20, 2016 local GUIEditor = { button = {}, window = {}, memo = {} } GUIEditor.window[1] = guiCreateWindow(675, 322, 317, 305, "teszt panel", false) guiWindowSetSizable(GUIEditor.window[1], false) szoveg = guiCreateMemo(13, 23, 294, 223, "", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(33, 255, 257, 40, "ok", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") addEventHandler("onClientGUIClick", GUIEditor.button[1], function() outputChatBox("Szöveg "..guiGetText(szoveg).." még szöveg") ) end) Link to comment
StefanAlmighty Posted August 20, 2016 Share Posted August 20, 2016 NeverGiveup gave, I presume a working chunk of code but didn't explain what was wrong: szoveg is the element returned from guiCreateMemo and you tried concatenating that element into a string, which cannot be done. You need to use guiGetText which will get all of the text from the GUI element which is in your case the memo. Also you define szoveg as a table to begin with, you didn't need to do that, you could've just done this: local szoveg = guiCreateMemo(13, 23, 294, 223, "", false, GUIEditor.window[1]) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now