Jump to content

Gameserver script, Strict standards Non-Static method error


r3jded

Recommended Posts

I have a script for a gameserver that acts up a bit, or rather a piece of code that need some recoding. I most kindly ask for help from somone who could help me as i am not very good at PHP.

From what i gather i need to transform this in to some kind of public static function but i dont know how to.

 

The code is: 

	//Output error
	if($umsg) {
		Core::getObject('messages')->add($message, true);   //Line 71
	} else {
		echo $message;
	}

	//Log the error
	if(!empty(Core::getObject('session')->server->login)) {
		$login = '_'.Core::getObject('session')->server->login;
	} else {
		$login = '';
	}
	writeLog('errors'.$login, $message);

Wich gives me the following error message: 

Strict Standards: Non-static method Core::getObject() should not be called statically in G:\xamp556\htdocs\rcp\includes\core.functions.php on line 71
Link to comment
Share on other sites

Thank you. That works.

And no, there is very little but more like no chance of finding a more updated version of the script as it is from 2009 and it is the latest version. i´ve spent a couple of days finding the right version PHP to run this on :D

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.