declaration of '' as array of functions

hello.

I'm trying to adapt a code that a friend helped me to do in processing to arduino. The code is basically changing the colors of a background in processing and doing some fades depending on the keys pressed. In the arduino I'm getting the colors from the database using the wifly shield and some inputs of the accelerometer.

the problem I'm gaving now is that one of the functions of the processing code my friend did is returning an array

int[] get_colour(int side)
    {
      int[] value = new int[3];
    
      if (side == 1) {
        value[0] = 255;
        value[1] = 0;
        value[2] = 100;
      }

the way you declare arrays on arduino is different so my guess was to do this

int get_colour[](int side)
    {
      int value[] = new int[3];
    
      if (side == 1) {
        value[0] = 255;
        value[1] = 0;
        value[2] = 100;
      }

but I'm getting the error " declaration of 'get_colour' as array of functions"

which makes sense.... but how can I make that function return this array of value?

The caller should define an array to be populated, and pass that array to the function.

int colors[3];

get_color(side, colors);

Then, the function should accept an array to write to:

void get_color(int side, int &colors[3])
{
   // Populate the colors array
}

Thanks, that helped

I'm now having a problem with the values that I have as null

 if (myColourControl != null )
      {
        pulse_my_colour();
        resetTargetControl();
      }

in here myColourControl is declared on top as a int myColourControl[3];

I'm getting the error that the null wasn't declared on this scope. The null is "lighting up" as a variable from arduino language :s what can it be?

You want to be comparing to NULL, not null. NULL is a C++ keyword with a very specific meaning.

It does not make sense, though, in your case, to be comparing an array to NULL.