Jump to content

[SOLVED] parse error, unexpected white space etc etc.


MasterACE14

Recommended Posts

I am recieving a parse error, it says:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/ace/public_html/shadowlords/functiondebug.php on line 28

 

line 28:

if($userrow['charname'] == "$userrow['charname'] ~SS~"){

 

full code:

<?php
function donate1() {

    global $userrow;

if($userrow['charname'] == "$userrow['charname'] ~SS~"){
$redd = "";
}
elseif($userrow['charname'] !== "$userrow['charname'] ~SS~"){
$redd = " ~SS~";
}    
    $charn = "$userrow['charname']";
    $bank = "$userrow['bank']";
    $maxmp = "$userrow['maxmp']";
    $maxtp = "$userrow['maxtp']";
    $maxhp = "$userrow['maxhp']";
$strengthh = "$userrow['strength']";
$dexterityy = "$userrow['dexterity']";
$experiencee = "$userrow['experience']";

    if ($userrow['verify'] == 1) {
        $charn = $userrow['charname'] . $redd;
        $bank = ceil($userrow['bank']+2500);
        $maxmp = ceil($userrow['maxmp']+25);
        $maxtp = ceil($userrow['maxtp']+25);
        $maxhp = ceil($userrow['maxhp']+25);
	$strengthh = ceil($userrow['strength']+25);
	$dexterityy = ceil($userrow['dexterity']+25);
	$experiencee = ceil($userrow['experience']+100);
        //echo("Transaction Successful!"); 
	}

    elseif ($userrow['verify'] !== 1) { die("This Page is restricted to people that have verified their accounts"); }

$con = mysql_connect("localhost","ace_ACE","******");
if (!$con)
  {
die('Could not connect: ' . mysql_error());
  }

mysql_select_db("ace_sl", $con);

    mysql_query("UPDATE `sl_users` SET `charname`='$charn' WHERE id='".$userrow['id']."'")
or die ("MYSQL ERROR: ".mysql_error()."");
mysql_query("UPDATE `sl_users` SET `bank`='$bank' WHERE id='".$userrow['id']."'")
or die ("MYSQL ERROR: ".mysql_error()."");
    mysql_query("UPDATE `sl_users` SET `maxmp`='$maxmp' WHERE id='".$userrow['id']."'")
or die ("MYSQL ERROR: ".mysql_error()."");
    mysql_query("UPDATE `sl_users` SET `maxtp`='$maxtp' WHERE id='".$userrow['id']."'")
or die ("MYSQL ERROR: ".mysql_error()."");
    mysql_query("UPDATE `sl_users` SET `maxhp`='$maxhp' WHERE id='".$userrow['id']."'")
or die ("MYSQL ERROR: ".mysql_error()."");
mysql_query("UPDATE `sl_users` SET `strength`='$strengthh' WHERE id='".$userrow['id']."'")
or die ("MYSQL ERROR: ".mysql_error()."");
mysql_query("UPDATE `sl_users` SET `dexterity`='$dexterityy' WHERE id='".$userrow['id']."'")
or die ("MYSQL ERROR: ".mysql_error()."");
mysql_query("UPDATE `sl_users` SET `experience`='$experiencee' WHERE id='".$userrow['id']."'")
or die ("MYSQL ERROR: ".mysql_error()."");
mysql_query("UPDATE `sl_users` SET `authlevel`='3' WHERE id='".$userrow['id']."'")
or die ("MYSQL ERROR: ".mysql_error()."");
};

donate1();
?>

its for people who have become members, I want it to add ~SS~ to the end of their name to show their members, and i'm doing the if statement to make sure it doesn't keep adding ~SS~ everytime they become a member lol. had 1 member with 3 ~SS~ 's after his name lol.

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.