char* array of serial communications?

Ok so basically i want my ATMEGA to be command-able by my pc.
so ‘-s 13 1 1’ is SET (Pin13) (OUTPUT) (HIGH).
I cant get it to store each command segment tho.

int inByte = 0;
int recivedCommandPos = 0;
char* recivedCommand[15];

void serialIO() {
  if (Serial.available() > 0) {
    inByte =  Serial.read();    
    if(inByte = 45) { // Begging of new command (-)
      recivedCommandPos = 0;
      recivedCommand[recivedCommandPos] = '\0';
    } else if(inByte = 10) { // End of command (\n)
      serialCommand();
    } else if(inByte = 32) { // Space
      recivedCommandPos++;
      recivedCommand[recivedCommandPos] = '\0';
    } else {
     recivedCommand[recivedCommandPos] = recivedCommand[recivedCommandPos] + String(inByte, DEC);
    }
  }
}

“recivedCommand[recivedCommandPos] = recivedCommand[recivedCommandPos] + String(inByte, DEC);” produces “error: cannot convert ‘String’ to ‘char*’ in assignment” and I’ve searched around but have no idea what to do.
Any help is much appreciated.

Maybe http://arduino.cc/en/Reference/StringToCharArray ?

Thanks for your reply. Yes that did it! Thank you.

Tho for the life of me i cant work out how to turn the char array into a string again; i thought you could just reference it as recivedCommand[0] would produce "test string" but instead i get "r".

Im using recivedCommandTMP.toCharArray(recivedCommand[recivedCommandPos], recivedCommandTMP.length()); to set the string.

how to turn the char array into a string again

Just create an empty string, go to the char array in a loop and add them chars one by one .

One problem you have is that recivedCommand is not an array of characters. It is an array of pointers to characters. Big difference, and the root of your problem.