Jump to content
MakeWebGames

Missions Error


HITMAN 17

Recommended Posts

Parse error: syntax error, unexpected ';', expecting T_FUNCTION in /home/thedestr/public_html/header.php on line 445

This Is The Code I Added To Header

if($ir['mission'] != 0)
{
$mq=$db->query("SELECT * FROM missions WHERE id=".$ir['mission']."",$c);
if($db->num_rows($mq)== 0)
{
$db->query("UPDATE users SET mission=0 WHERE userid=".$userid."",$c);
}
$rm=$db->fetch_row($mq);
if($rm['location_on']== 1)
{
if($rm['location_value'] != $ir['location'])
{ $db->query("UPDATE users SET mission=0 WHERE userid=".$userid."",$c);
event_add($ir['userid'],"Your mission has been ended because you have moved city.",$c);
}
}
if($rm['item_on']== 1 && $rm['attack_on']== 0)
{
$invq=$db->query("SELECT * FROM inventory WHERE inv_userid=".$userid." AND inv_itemid=".$rm['item_value']."",$c);
if($db->num_row($invq))
{ 
$exp=rand($ir['level'],$ir['level']*5);
$db->query("UPDATE users SET mission=0, money=money+".$rm['money'].", crystals=crystals+".$rm['crystals'].", exp=exp+".$exp.", mission_counter=mission_counter+'1' WHERE userid=".$userid."",$c);
$mission=($ir['mission']);
$db->query("INSERT INTO missdone VALUES ($userid,$mission);",$c);
$db->query("DELETE FROM inventory WHERE inv_userid=$userid AND inv_itemid=".$rm['item_value']."",$c);
event_add($ir['userid'],"You have completed the mission and you was credited your reward.",$c);
}
}
if($rm['item_on']== 0 && $rm['attack_on']== 0)
{
$db->query("UPDATE users SET mission=0 WHERE userid=".$userid."",$c);
$owner=1;
event_add($owner,"The mission $rm[name] mission ($rm[id]) is not set to a mission, Please do so.",$c);
}
if($rm['item_on']== 0 && $rm['attack_on']== 1)
{
$usa=$_SESSION['mission_attack'];
$aa=$db->query("SELECT * FROM missions WHERE id=".$ir['mission']." AND attack_value=".$_SESSION['mission_attack']."",$c);
if($db->num_rows($aa))
{
$exp=rand($ir['level'],$ir['level']*10);
$db->query("UPDATE users SET mission=0, money=money+".$rm['money'].", crystals=crystals+".$rm['crystals'].", exp=exp+".$exp.", mission_counter=mission_counter+'1' WHERE userid=".$userid."",$c);
$mission=($ir['mission']);
$db->query("INSERT INTO missdone VALUES ($userid,$mission);",$c);
event_add($ir['userid'],"You have completed the mission and you was credited your reward.",$c);
}
}

 

Line Of Error

?>

Link to comment
Share on other sites

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.   Paste as plain text instead

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