Problem with Maths in Pawno ( Not whole Numbers )
#1

Well i'm trying to make a number * 1.5
and with it its giving me a warning and if i do whole number such as * 2 it work fine. Is there a way how to fix it? anyways here's the code.

Code that gave me warning:
Код:
interest = bankmoney * 1.5;
Code that worked absulutely fine:
Код:
interest = bankmoney * 2;
Warning by Pawno when using Decimal Numbers:
Код:
D:\Program Files\Rockstar Games\GTA San Andreas\0.3 server\gamemodes\mrp.pwn(3893) : warning 213: tag mismatch
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
I want to make it with 1.5 how can i do it?
Reply
#2

1.5 is a float and you can only multiply floats with floats
pawn Код:
new Float:bankmoney;
new Float:interest = bankmoney * 1.5;
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)