Hi there,
Try the following.
[lua]
local gameState = { menuProgress = 1 } – Note that I added an equal sign here
local menuText = { buttonLabel1 = “tempText” } – Note that I added an equal sign here
print ( “buttonLabel”…(gameState.menuProgress) ) – No change; this should print buttonLabel1
print( menuText[“buttonLabel” … (gamestate.menuProgress)]) – Note that you use a string index by putting it in square brackets
[/lua]
In general, if myTable is a table and “myString” is a string assigned to a variable key, then the following are all equivalent:
myTable[key]
myTable[“myString”]
myTable.myString
However, only the bracket notation will let you manipulate the key, like string concatenation as you were trying to do.
Hope this helps!