MyBB Community Forums

Full Version: Parse Error: syntax error, unexpected T_NS_SEPARATOR, expecting '}'
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, I'm writing a plugin for the warning system... (So I don't know if this has to be moved in the Development section..) And here is what I get:

Quote:Parse error: syntax error, unexpected T_NS_SEPARATOR, expecting '}' in C:\xampp\htdocs\mybb16\inc\plugins\warnnotinfraction.php(138) : eval()'d code on line 36
This is my function:
function warn_pm()
{
	// Unfortunately, we've to globalize many variables...
	global $mybb, $send_pm_checked, $message, $lang, $user;
	global $pm_notify, $templates, $smilieinserter, $pm_subject, $codebuttons;
	global $send_pm_forced;
	
	// It's always a good idea to send a notify to the user. (IMO)
	$send_pm_checked = ($mybb->settings['wsi_force_pm']) ? "checked=\"checked\"" : "";
	$send_pm_forced = ($mybb->settings['wsi_force_pm']) ? "return false; " : "";

	// Are we coming here from a post?
	if($mybb->input['pid'])
	{
		$warnedpost = get_post($mybb->input['pid']);
		$message = $lang->sprintf($lang->warning_pm_message, $user['username'], $mybb->settings['bbname'], $lang->sprintf($lang->wsi_msg, $warnedpost['username'], $warnedpost['message'], $mybb->settings['bburl'], $mybb->input['pid']), '{points}');
	}
	else // No, we're coming here from profile.
	{
		$message = $lang->sprintf($lang->warning_pm_message, $user['username'], $mybb->settings['bbname'], '{points}', "");
	}
	eval("\$pm_notify = \"".$templates->get("warnings_warn_pm")."\";"); // We've to get this template again to apply changes.
}
The hook is warnings_warn_end... I can't see any error Undecided
And the error came out only today .__.
Bump (?)
Seems it's an error in a template file (I believe warnings_warn_pm). Please post the contents of the warnings_warn_pm template.
Omg, thank you! The template was messed up! Thank you, I've solved!