• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Solved Call to undefined function add_points() in...

RaikND

facebook.xenoria.org
Joined
May 12, 2010
Messages
942
Reaction score
10
Location
Spain
Print error:
Code:
Fatal error: Call to undefined function add_points() in /home/xenoria/web/buypoints.php on line 109

Line 109:
PHP:
//// Start line 109////
if(add_points($account,$config['system'] == 'daopay' && [$offer_id]['addpoints']))
				{
					save_trans('config/daopay.log', $account->getId(), $posted_pincode);
					$main_content .= '<h2><font color="red">Good PIN code. Added '.$config['system'] == 'daopay' && [$offer_id]['addpoints'].' Premium Points to account of: '.$to_user.' !</font></h2>';
				}

i will give rep+ to whos help me, thanks!
 
Last edited:
The function add_points does not exist. It is possible that the function is located within another file, and is not included to the active file (buypoints.php). Search the forum for similar problems and I'm sure you'll find a way to include that function.
 
Yes, but iam newbie on .php i dont know much from this and i try to make a system from lang, but i delete anyelse and i dont know now what is...:S i send you a link with my own buypoints.php and help me to fix it?
 
Add this piece of code after the configuration part in buypoints.php
PHP:
function add_points(OTS_Account $account, $number_of_points)
{
    if($account->isLoaded())
    {
        $account->setCustomField('premium_points', ($account->getCustomField('premium_points')+$number_of_points));
        return true;
    }
    else
        return false;
}
 
Back
Top