Im trying to make some sort of simple console. For now I use an editbox and a static text. The functionality I wanna do in a Lua script, but i ran into a problem. when trying to combine 2 strings like this
Code: Select all
local text = winMgr:getWindow("Root/ConsoleInputLine"):getText()
local oldText = winMgr:getWindow("Root/ConsoleWindow"):getText()
winMgr:getWindow("Root/ConsoleInputLine"):setText("")
local newText = oldText + text
I get this error
[string "../datafiles/lua_scripts/consoleGui.lua"]:11: attempt to perform arithmetic on local 'oldText' (a string value)
What is the correct way of combining 2 strings in Lua?