Hi,
I am trying to read a series of numbers from a .txt file and convert those numbers into a RGB value using a function.
Basically, the .txt file is looking like so:
255,0,0
0,0,64
41,201,32
My function reads each line in the file and converts the numbers on each line into 3 series of numbers (separated by the comma).
Inside the function it reads (on the first line): R = 255 G = 0 B = 0.
So I store this in a RETURNDATA() array: RETURNDATA(1) = R RETURNDATA(2) = G etc.
The function did its purpose and I want to convert the RETURNDATA() numbers into a RGB Value: color = RGB( RETURNDATA(1), etc. )
But RETURNDATA(x) is now 0. (!) How come it can be 255 inside the function and 0 outside the function? I don't get it.
my code, for better explanation, is attached.