BeBot - An Anarchy Online and Age Of Conan chat automaton
Archive => Anarchy Online Archive => AO 0.6 support => Topic started by: Faelwen on April 30, 2009, 04:40:32 pm
-
Fatal error: Cannot access private propert Bot::$buddy_status in C:\Users\Steven\and so on\Bebot-hyborian\core\Whois.php on line 124.
/*
This gets called if a buddy logs on/off
*/
function buddy($name, $online, $level, $location, $class)
{
$user = $this -> bot -> core("chat") -> get_uid($name);
$who = array();
$who["id"] = $user;
$who["nickname"] = $name;
if(!array_key_exists($name, $this -> bot -> buddy_status))
$who["online"] = 0;
else
{
if(4 == ($this -> bot -> buddy_status[$name] & 4))
$who["online"] = 3;
else if(2 == ($this -> bot -> buddy_status[$name] & 2))
$who["online"] = 2;
else if(1 == ($this -> bot -> buddy_status[$name] & 1))
$who["online"] = 1;
else
$who["online"] = 0;
}
$who["level"] = $level;
$who["location"] = $location;
$class_name = $this -> class_name[$class];
if ($class_name == "")
{
$class_name = "Commoner";
}
$who["class"] = $class_name;
$lookup = $this -> bot -> db -> select("SELECT * FROM #___craftingclass WHERE name = '" . $name . "'", MYSQL_ASSOC);
if (!empty($lookup))
{
$who["craft1"] = $lookup[0]['class1'];
$who["craft2"] = $lookup[0]['class2'];
}
$this -> update($who);
}
I simply can't fix this :S, anyone else can spot the problem here?
-
I just checked the current Bot.php versions, and $buddy_status is ALWAYS public.
To check this for yourself look into Bot.php, and search for the first occurence of buddy_status.
The line should be public $buddy_status = array();
If it is something with private change that to public.
-
fixed from private to public,
But another problem came up
Tfwbot [CORE] [ERROR] Module 'access_control' does not exist or is not loaded.
Tfwbot [ERROR] [access_control] Undefined function create(all, maintenan
ce, OWNER)!
/*
The Class itself...
*/
class AccessControl_Core extends BasePassiveModule
{
private $access_cache;
private $access_levels;
private $deny_levels;
private $security_levels;
private $channels;
private $startup;
$this -> bot -> core("settings") -> create("AccessControl", "DefaultLevel", "MEMBER", "Which is the minimal access level that should get access to new commands on default? Or should the default for new commands be to disabled access to them at all?", "ANONYMOUS;GUEST;MEMBER;LEADER;ADMIN;SUPERADMIN;OWNER;ENABLED");
$this -> bot -> core("settings") -> create("AccessControl", "LockGc", FALSE, "Are all commands in the guild chat locked from use?", "On;Off", TRUE);
$this -> bot -> core("settings") -> create("AccessControl", "LockPgroup", FALSE, "Are all commands in the private chatgroup locked from use?", "On;Off", TRUE);
What is the problem exactly in here?
-
Is that with bebot 0.6.2? Because it's the first time I've heard of that problem.
-
Yes it's with the newest version.
-
Someone working on this?
-
Which PHP version are you using? And could you try using a clean install of BeBot from https://launchpad.net/bebot/+download just to be sure?
-
Will try once again then.
Using all the latest updates from MySQL + PHP 5.2.9.
Everything else works except the Access_controll (Will post the errors when i'm home).
Thanks for your work, stay tuned for more errors from
// Failwen! :)
-
Fixed all the problems, i did exactly what the Readme.txt said and a little more since i had to fill in bot.conf and mysql.conf once again in the cmd.
Thanks for all the help. Will porbably post more in this forum later on.
-
Happy to hear you got it working :)