I keep getting this error...

Parse error: syntax error, unexpected T_STRING in /home/modernra/public_html/ifearmodz.com/Forum/admincp/adminpermissions.php on line 36

But when I change it i get errors on other lines I want to stop before I mess everything up and ask for help.

Here is what I have

if (!in_array($vbulletin->userinfo['userid'], preg_split('#\s*,\s*#s', $vbulletin->$config['SpecialUser']['superadministrators'] = '7'

 print_stop_message ('sorry_you_are_not_allowed_to_edit_admin_permissions');
                                                                            }
    iSiiK;10975870 wrote:

    I keep getting this error...

    Parse error: syntax error, unexpected T_STRING in /home/modernra/public_html/ifearmodz.com/Forum/admincp/adminpermissions.php on line 36

    But when I change it i get errors on other lines I want to stop before I mess everything up and ask for help.

    Here is what I have

    if (!in_array($vbulletin->userinfo['userid'], preg_split('#\s*,\s*#s', $vbulletin->$config['SpecialUser']['superadministrators'] = '7'
    
     print_stop_message ('sorry_you_are_not_allowed_to_edit_admin_permissions');
                                                                                }

    From what I can see, you haven't opened the IF statement with an open bracket

    if()
    { <----

    }

    You've closed it, but not opened it. Plus you've missed a few closing brackets on the statements...

    Try the following, it SHOULD work:

    if(!in_array($vbulletin->userinfo['userid'], preg_split('#\s*,\s*#s', $vbulletin->$config['SpecialUser']['superadministrators'] ='7')))
    {
    	print_stop_message ('sorry_you_are_not_allowed_to_edit_admin_permissions');
    }

      I'd say this part:

      $vbulletin->$config['SpecialUser']['superadministrators'] ='7'

      is also incorrect as well. However, since it doesn't make much sense, I'm not sure what the intent was and/or how to fix it.

        the3rdhero;10975894 wrote:

        From what I can see, you haven't opened the IF statement with an open bracket

        if()
        { <----

        }

        You've closed it, but not opened it. Plus you've missed a few closing brackets on the statements...

        Try the following, it SHOULD work:

        if(!in_array($vbulletin->userinfo['userid'], preg_split('#\s*,\s*#s', $vbulletin->$config['SpecialUser']['superadministrators'] ='7')))
        {
        	print_stop_message ('sorry_you_are_not_allowed_to_edit_admin_permissions');
        }

        Hey thanks a lot that worked and I'm all set! 😃

          Write a Reply...