BeBot - An Anarchy Online and Age Of Conan chat automaton
Archive => Anarchy Online Archive => BeBot 0.2 support => Topic started by: neongen on August 20, 2006, 09:50:25 pm
-
have a little problem with my !bid command.
when i use !bid <number> (tryed 2, 5 and 10) the bot restart and give me this error
Fatal error: Cannot use string offset as an array in C:\halocom\modules\bid.php on line 116
this is whats on line 116
$result = $result[0][0] / 10;
-
Find:
$result = $this -> bot -> db -> select("SELECT points FROM raid_points WHERE id = " . $this -> points_to($name));
$result = $result[0][0] / 10;
Change to:
$result = $this -> bot -> db -> select("SELECT points FROM raid_points WHERE id = " . $this -> points_to($name));
if (empty($result))
{
$this -> bot -> send_tell($name, "You appear to not have any points yet. No points table entry found.");
return false;
}
$result = $result[0][0] / 10;
-
thx now i don#t have that problem anymore :)