logical69 0 Newbie Poster

Ok here is the story, im trying to get a clone script to work and im failing missrably this is mostly due to the fact im still learning everything from php, javascript and linux! (yea im going way over my own head lol)

Right here is the situation, im working on an attack script someone else wrote and it dont work right. Ive tried endlessly to get it to work right and failed! So im hoping someone can help us out here :)

The code

$atackStrength=getStrikeAction($atacker);
$atackStrength=rand(round($atackStrength/2),$atackStrength);

What the code is ment to be doing is getting the function getStrikeAction from another file (which it does) and then attack between the top StrikeAction and a little lower (the little lower i would like to specify but i dunno how at the moment). Anyway as it stands now it will hit for just a random amount including negative values! Also in tests ive noticed the max hit to be about 2.1bil can anyone help me with this code?

If you require more info dont hesitate to ask :)