BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => Anarchy Online Archive => AO 0.6 support => Topic started by: crocks on October 09, 2012, 12:51:24 pm

Title: Cant call function from another module.
Post by: crocks on October 09, 2012, 12:51:24 pm
Hey Guys. I am trying to call function to show points in news module. This is what I am using:

in News.php
Code: [Select]
$this->register_module("points");
$points = $this->bot->core("points")->show_points($name);
$inside .= "You have ($points) points.";

Here is an error log from console:
Code: [Select]
Crocksbot [ERROR]       [News]  Undefined function show_points(Crocks)!
According to error log it seems like the news.php is still trying to find the function inside the news.php module instead of points.php as its been called.

Have I done anything wrong please?
Thanks in advance for help.
Title: Re: Cant call function from another module.
Post by: Shelly on October 12, 2012, 02:53:08 am
It would be my guess that you don't have a function declared, but you are attempting to call a function "show_points()"
Title: Re: Cant call function from another module.
Post by: crocks on October 12, 2012, 02:32:47 pm
So I tryied to move the code to the default news.php module whichs being released here and it works. Guess I had some crazy bug in my news.php which I had customized for my guild. Anyway thanks for looking over that :)

Crocks
SimplePortal 2.3.7 © 2008-2024, SimplePortal