Jump to content

[SOLVED] minus!!


grlayouts

Recommended Posts

$mypower = ($mywep[power] + $stat[strength] - $earm[power]);
if($mypower<0){ ($mypower=0);
$epower = ($enemy[strength] + $ewep[power] - $myarm[power] );
if($epower<0){ ($epower=0);

 

this still aint working, when i run the script i get

Fatal error: Unknown function: attackback() in /home/hobotown/public_html/battle.php on line 566

Link to comment
Share on other sites

You're still not posting the relevant code, that's why I agreed. You posted SQL statements, and what you wrote will work in SQL. Your code has nothing about the function (attackback()) that the error is referencing.

 

You said you tried the suggestion Toon posted, yet when I asked you to post it you said you had, but the code doesn't have his suggestion.

 

This code is missing brackets:

 

$mypower = ($mywep[power] + $stat[strength] - $earm[power]);

if($mypower<0){

  $mypower=0;

}

$epower = ($enemy[strength] + $ewep[power] - $myarm[power] );

if($epower<0){

  $epower=0;

}

 

Link to comment
Share on other sites

How are you so sure? You can't figure out how to do an if statement, but you're sure the rest of the code works? I'm not saying post all the code, but the ERROR is very specific about the function and the line, and what you posted has nothing to do with it.

 

What you posted was incorrect code however, and if you fix the brackets that may fix it.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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

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

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.