Shroomboy
04-17-2002, 04:33 AM
Ok I am making a hack and the code adds/subtracts numbers due to buying/selling... Well when an item is bought eh numbers are added which is this code
$newhp = ($hpfield + $hp);
$newmp = ($mpfield + $mp);
and for the subtraction I used
$newhp = ($hpfield - $hp);
$newmp = ($mpfield - $mp);
but instead of it going back to zero it makes the number negative... like lets say $hpfield + $hp = 30 when i use the subtraction the number becomes -30... i know the problem is with the "-" I think... this is my first attempt at a hack... oh and BTW it is an EXP hack taht is intragrated with the itemshop to give your HP/MP and like 7 more compared to what weapon you buy...
$newhp = ($hpfield + $hp);
$newmp = ($mpfield + $mp);
and for the subtraction I used
$newhp = ($hpfield - $hp);
$newmp = ($mpfield - $mp);
but instead of it going back to zero it makes the number negative... like lets say $hpfield + $hp = 30 when i use the subtraction the number becomes -30... i know the problem is with the "-" I think... this is my first attempt at a hack... oh and BTW it is an EXP hack taht is intragrated with the itemshop to give your HP/MP and like 7 more compared to what weapon you buy...