Jump to content

Gameserver script, Strict standards Non-Static method error


Go to solution Solved by requinix,

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

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

Edited by r3jded
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.