Jump to content
MakeWebGames

Recommended Posts

Posted

I was spending over a half hour trying to set this up.

I got this error

 Parse error: syntax error, unexpected '{' in /home/somethinghere/public_html/attack.php on line 194 

The lines surrounding it

Parse error: syntax error, unexpected '{' in /home/somethinghere/public_html/attack.php on line 194

$strtest=$odata['strength']*.75;
$agilitytest=$ir['agility']>$odata['agility']*100;
$guardtest=$odata['guard']*.75;

if($youdata['strength']>$strtest)
{ print"you passed the strength test";
if($ir['agility']>$agilitytest)
{print "you passed the agility test";

if($youdata['guard']>$guardtest)
{ $mydamage={$odata['hp'];}


print("You Instantly killed them"); }
}
}

line 194 is exactly

  { $mydamage={$odata['hp'];}

As I said I have spent time trying to set this up but I'm not quite sure how that could be.

Posted

Re: customizing part of attack v2 problem

I think this might be what you are trying to do

 

  $strtest = $odata['strength'] * .75;
 $agilitytest = $ir['agility'] > $odata['agility'] * 100;
 $guardtest = $odata['guard'] * .75;

 if ($youdata['strength'] > $strtest) {
     print "you passed the strength test
";
     if ($ir['agility'] > $agilitytest) {
         print "you passed the agility test
";

         if ($youdata['guard'] > $guardtest) {
             $mydamage = $odata['hp'];
             print "You Instantly killed them
";
         }
     }
 }

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