request for member which is of non-class type

i am doing a project for my uni to control a relay on and off using sim 808 module and arduino mega. i am getting this error when i compile

"request for member índexOf'in message which is of non class type char[160]'

here is my code

please help

#include <DFRobot_sim808.h>
#include <sim808.h>

#include <DFRobot_sim808.h>
#include <SoftwareSerial.h>
#define MESSAGE_LENGTH 160
char message[160];
int messageIndex = 0;
char MESSAGE[300];
char phone[16];
char datetime[24];

#define PIN_TX 10
#define PIN_RX 11
#define RelayPin 5
SoftwareSerial mySerial(PIN_TX,PIN_RX);
DFRobot_SIM808 sim808(&mySerial);//Connect RX,TX,PWR,

void readSMS();

void setup()
{
mySerial.begin(9600);
Serial.begin(9600);
pinMode (RelayPin,OUTPUT);

while(!sim808.init())
{
Serial.print("Sim808 init error\r\n");
delay(1000);
}
delay(3000);

Serial.println("SIM Init success");
Serial.println("Waiting for Command");
}

void loop()
{
messageIndex = sim808.isSMSunread();
if (messageIndex > 0)
{
readSMS();
Serial.println("Waiting for Command");
}
}

void readSMS()
{
Serial.print("messageIndex: ");
Serial.println(messageIndex);

sim808.readSMS(messageIndex, message, MESSAGE_LENGTH, phone, datetime);

sim808.deleteSMS(messageIndex);
Serial.print("From number: ");
Serial.println(phone);
Serial.print("Date & Time: ");
Serial.println(datetime);
Serial.print("Recieved Message: ");
Serial.println(message);

if (message.indexOf("ON")>=0)
{
digitalWrite (RelayPin,HIGH);
delay (5000);
Serial.println("Relay On");
}
if (message.indexOf("OF")>=0)
{
digitalWrite (RelayPin,LOW);
Serial.println("Relay Off");
}
}

SMS_Check.ino (1.5 KB)

Please re-post your code using Code Tags as described in Itme #6 here: Read this before posting a programming question ... - Programming Questions - Arduino Forum

But, before doing that, hit ctrl-t in the Arduino IDE to auto-format your code because your indenting and formatting is atrocious.

message is a zero terminated array of chars (aka a C string (lowercase s))
indexOf works with a String (an object created with the String library)

To find whether a string constant, such as "ON" is within a string you can use the strstr() function