Archive > AO 0.6 support

Cant call function from another module.

(1/1)

crocks:
Hey Guys. I am trying to call function to show points in news module. This is what I am using:

in News.php

--- Code: ---$this->register_module("points");
$points = $this->bot->core("points")->show_points($name);
$inside .= "You have ($points) points.";

--- End code ---

Here is an error log from console:

--- Code: ---Crocksbot [ERROR]       [News]  Undefined function show_points(Crocks)!
--- End code ---

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.

Shelly:
It would be my guess that you don't have a function declared, but you are attempting to call a function "show_points()"

crocks:
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

Navigation

[0] Message Index

Go to full version