Quote from ShefkiSo what could cause g to be nil? Simple answer is the ff assignment. ff isn't a number it's a variable. Since ff has never been assigned it's nil. If you want to use hexidecimal values in Lua you need to prefix the number with 0xx. So change:
[code]r,g,b = 00, ff, 00[/code]to
[code]r,g,b = 0x00,0xff,0x00[/code]or even
[code]r,g,b = 0,255,0[/code]And it should work fine.
huh! sad thing is that I've programmed for a while, but C++ was never my strong point. So the color manipulation has always been weak for me. I knew that I wanted 255 just I thought setting the variable as a hex number would work, I guess not. Thanks a lot for the correction.