I have the following code adding items to a combo box:
local cur = guiCalls[i][1]:addItem("none")
cur.callbackInt = i + #baseVariables
cur.onTouch = buttonCallback
--more lines of code below this for other stuff
and my button callback:
local function buttonCallback(workspace, button)
local buttonInt, callbackInt, isPos
if button ~= nil then --button is equal to nil, so not run
buttonInt = button.buttonInt
callbackInt = button.callbackInt
isPos = button.isPos
end
--more lines of code below this
I have the following code adding items to a combo box:
and my button callback: