Error:invalid conversion from 'int*' to 'int' when returning array from function

Hi,
I am having some trouble when trying to return an integer array from a function. I believe the problem is that I am mixing up pointers with their values but I cannot find the cause of the issue.

This program is for an LED clock and I have posted the code causing the issue below. You can see the full code here: https://hastebin.com/xebigoquxa.cpp

int getRGB(String req) {
  static int colors[3];
  int startPoint = req.indexOf("/setcolor/");
  Serial.println(req);
  String colorRGB = getStringPartByNr(req, '/', 2);
  colors[0] = getStringPartByNr(colorRGB, '-', 0).toInt();
  colors[1] = getStringPartByNr(colorRGB, '-', 1).toInt();
  colors[2] = getStringPartByNr(colorRGB, '-', 2).toInt();
  return(colors);
}

The function is called with 'primarynightmodecolor = getRGB(req);' where primarynightmodecolor is an array of three integers. When compiling I get the error: invalid conversion from 'int*' to 'int' [-fpermissive]

Here is the full error log: https://hastebin.com/iqenonejeh.http

I made a few changes between this and the last revision so there may be other bugs, but this is the one that I am unable to fix.

Hope someone can help out,

Dom

You are saying that your function returns an int and you are not..

[color=red]int[/color] getRGB(String req) {
  static int colors[3];
  ...
  return(colors);
}

change the signature, colors is an array of int, so the variable name is a pointer to an int (so an int *)

Using the String class is not a good idea in general