Godhand Posted February 11, 2008 Posted February 11, 2008 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. Quote
fbiss Posted February 11, 2008 Posted February 11, 2008 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 "; } } } Quote
Godhand Posted February 12, 2008 Author Posted February 12, 2008 Re: customizing part of attack v2 problem Yup it is thanks. I thought at first it wasn't just because of syntax. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.