I have a problem here. I am currently making a hook, which runs a function inside a class, but it goes wrong..
It says that the variable ‘db’ is not defined.
Exactly error is:
Notice: Undefined variable: db in /home/turborpg/public_html/script/lib/class.gamebase.php on line 72
Here is the source of the hook I run:
http://pastebin.com/aKZZaafr
And here is the source for the class.gamebase.php:
http://pastebin.com/fGVnY9JD
Hope someone are willing to help me out here. I am new with hooks and classes, this is my first try to make a custom one.
You use
$dbas a variable in your method. You should use it as a property$this->db.