Posted 01 July 2017 - 11:01 PM
I have been trying to create a table that will later be used to create text boxes. This is in a custom API I am writing to use with various programs. When I try to call the function that creates it, it gives the error "attempt to index ? (a nil value)". Below I have the specific code and any relevant variables.
--values of variables used in function
section = "home"
page = 1
--call used in program using API
gui.set_text("test", "This is a test", 3, 3)
--broken function in API
function set_text(name, data, x, y)
text[section][page][name]["data"] = data
text[section][page][name]["x"] = x
text[section][page][name]["y"] = y
text[section][page][name]["display"] = true
end
Edited on 01 July 2017 - 09:56 PM