Problem whit attack.php

Place for questions and answers for all newcomers and new coders. This is a free for all forum, no question is too stupid and to noob.
Post Reply
darklorda
Posts: 8
Joined: Thu Feb 23, 2012 8:49 am

Problem whit attack.php

Post by darklorda »

Sorry for post but i dont know where is my wrong :X

Parse error: parse error in C:\wamp\www\tutorial\attack.php on line 74

////////////////////////video 6///////////////////////
if ($playerinfo3['level'] > $creatureinfo3['level'])
{
$firstmod = $playerinfo3['level'] - $creatureinfo3['level'];
$secondmod = $firstmod * 10 ;
if ($secondmod > 90)($secondmod = 90;)
$thirdmod = ($secodmod / 100) * $creatureinfo3['exper'];
$totalexper =$creatureinfo3['exper'] - $thirdmod;
}
else
{
$firstmod = $creatureinfo3['level'] - $playerinfo3['level'];
$secondmod = $firstmod* 10 ;
if ($secondmod > 90)($secondmod = 90;)
$thirdmod = ($secondmod / 100) * $creatureinfo3['exper'];
$totalexper =$creatureinfo3['exper'] + $thirdmod;
}

echo "<br><b><big>You gain " . $totalexper . " experience.</b></big><br>";
$updateplayer="update players set exper=exper+'$totalexper' where name='$player'";
mysql_query($updateplayer) or die("Could not update player");



echo "<a href='battle.php'>Go Back";
exit;
}
////////////////////////////////
User avatar
Chris
Posts: 1581
Joined: Wed Sep 30, 2009 7:22 pm

Re: Problem whit attack.php

Post by Chris »

Code: Select all

if ($secondmod > 90)($secondmod = 90;) 
I'm guessing you meant to use curly braces?

Code: Select all

if ($secondmod > 90){ $secondmod = 90; } 
same applies for:

Code: Select all

if ($secondmod > 90)($secondmod = 90;) 
Fighting for peace is declaring war on war. If you want peace be peaceful.
darklorda
Posts: 8
Joined: Thu Feb 23, 2012 8:49 am

Re: Problem whit attack.php

Post by darklorda »

Chris wrote:

Code: Select all

if ($secondmod > 90)($secondmod = 90;) 
I'm guessing you meant to use curly braces?

Code: Select all

if ($secondmod > 90){ $secondmod = 90; } 
same applies for:

Code: Select all

if ($secondmod > 90)($secondmod = 90;) 

the same problem
Post Reply

Return to “Beginner Help and Support”