Ian
10-08-2012, 06:07 PM
For a progress report, I need to multiply something by a decimal to get an amount of xp/h. The only problem is the xp/item (bones) is 4.5 I kept getting a type mismatch error until I thought "maybe it was the decimal". I changed 4.5 to 4 and it worked. Now I just want to know if there is a way to get it to multiply 4.5 . The only thing I can think of is this: X(4 + (1/2))
Any other ideas?
With decimals (doesn't work):
WriteLn('~XP earned:' + IntToStr(Bones *4.5) + '(' + IntToStr(XPPH) + ' P/H)~');
With fractions (works):
WriteLn('~XP earned:' + IntToStr(Bones * (4 + (1/2))) + '(' + IntToStr(XPPH) + ' P/H)~');
Any other ideas?
With decimals (doesn't work):
WriteLn('~XP earned:' + IntToStr(Bones *4.5) + '(' + IntToStr(XPPH) + ' P/H)~');
With fractions (works):
WriteLn('~XP earned:' + IntToStr(Bones * (4 + (1/2))) + '(' + IntToStr(XPPH) + ' P/H)~');