getting unexpected T_ELSEIF error

I’m trying to run a bot for a chat box but I’m getting an error. My goal is to set different access ranks for a bot and also add a lock. so far so good but this seems to be the only issue right now with that

Error:

Code:
[php] case ‘!g’:
case ‘!google’:
if(in_array($data[‘id’], $owner)); {
$res = $this->get(‘http://www.google.com/search?hl=en&source=hp&biw=&bih=&q=’.str_replace(’ ‘,’+’,$command[1]).’&btnG=Google+Search’,true);
for($i=0;$i<3;$i++) {
$msg=$this->getBetween($res, ‘

<a href="’, ‘"’);
$res = str_replace(’

<a href="’.$msg,’’,$res);
$this->sendMessage($msg);
sleep(1);
}
}
elseif(in_array($data[‘id’], $trusted) && $lock==“off”); {
$res = $this->get(‘http://www.google.com/search?hl=en&source=hp&biw=&bih=&q=’.str_replace(’ ‘,’+’,$command[1]).’&btnG=Google+Search’,true);
for($i=0;$i<3;$i++) {
$msg=$this->getBetween($res, ‘

<a href="’, ‘"’);
$res = str_replace(’

<a href="’.$msg,’’,$res);
$this->sendMessage($msg);
sleep(1);
}
}
elseif(in_array($data[‘id’], $trusted) && $lock==“on”); {
$res = $this->get(‘http://www.google.com/search?hl=en&source=hp&biw=&bih=&q=’.str_replace(’ ‘,’+’,$command[1]).’&btnG=Google+Search’,true);
for($i=0;$i<3;$i++) {
$msg=$this->getBetween($res, ‘

<a href="’, ‘"’);
$res = str_replace(’

<a href="’.$msg,’’,$res);
$this->sendPrivateMessage($msg);
sleep(1);
}
}
else $this->sendPrivateMessage(“Trusted users only.”, $data[‘id’]);
break;[/php]

Its pointing to the lines with else in it (including elseif)
I tried changing the elseif to just if but then it pointed to the last else statement. Any suggestions?

Sponsor our Newsletter | Privacy Policy | Terms of Service