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

Title: !bid
Post 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;
Title: Re: !bid
Post by: Khalem on August 21, 2006, 08:53:04 am
Find:
Code: [Select]
$result = $this -> bot -> db -> select("SELECT points FROM raid_points WHERE id = " . $this -> points_to($name));
$result = $result[0][0] / 10;

Change to:
Code: [Select]
$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;
Title: Re: !bid
Post by: neongen on August 21, 2006, 11:42:34 am
thx now i don#t have that problem anymore  :)
SimplePortal 2.3.7 © 2008-2024, SimplePortal