Hi
why does this not work? I want to pass a variable from the table to set the fill colour but it does not work. the variable is been passed ok.
Thank you
local MyColors = {}
MyColors[1] = “0,0,255” --blue
MyColors[2] = “255,0,0” --red
MyColors[3] = “255,255,0” --Yellow
MyColors[4] = “0,128,0” --green
MyColors[5] = “128,0,128” --purple
MyColors[6] = “255,255,0” --Yellow
MyColors[7] = “128.0,128” --purple
MyColors[8] = “0,128,0” --green
MyColors[9] = “0,0,255” --blue
MyColors[10] = “0,0,255” --blue
print(“color is”, MyColors[1]) --Prints 0,0,255
local col1 = display.newRect( display.contentWidth*0.25, display.contentHeight - 140, 70, 70 )
col1.strokeWidth = 1
col1:setFillColor(MyColors[1])
col1:setStrokeColor( 1, 0, 0 )