Reducing number by 20%?
#8

Quote:
Originally Posted by Dusan01
Посмотреть сообщение
basic math bro...

Код:
new price=HouseInfo[houseid][hPrice]*0.8;
new on‌eprecent=HouseInfo[houseid][hPrice]*0.8/100;
new twozerop = oneprecent*20;
new finalprice = price - twozerop;
price reduced by 20% is: finalprice
Quote:
Originally Posted by Cypress
Посмотреть сообщение
Storing a float variable into a non float variable won't work and obviously will give you the error that you have.

pawn Код:
new Float:price = ( HouseInfo[houseid][hPrice] * 0.8 );
This way it will remain float and you don't have to use floatround either..
Doesn't work also I get "warning 213: tag mismatch"

Quote:
Originally Posted by AbyssMorgan
Посмотреть сообщение
PHP код:
new price=floatround(HouseInfo[houseid][hPrice]*0.8); 
thanks
Reply


Messages In This Thread
Reducing number by 20%? - by Aa12 - 31.01.2016, 16:36
Re: Reducing number by 20%? - by Dusan01 - 31.01.2016, 16:38
Re: Reducing number by 20%? - by Aa12 - 31.01.2016, 16:48
Re: Reducing number by 20%? - by Mencent - 31.01.2016, 16:53
Re: Reducing number by 20%? - by Dusan01 - 31.01.2016, 16:56
Re: Reducing number by 20%? - by AbyssMorgan - 31.01.2016, 17:11
Re: Reducing number by 20%? - by Cypress - 31.01.2016, 17:17
Re: Reducing number by 20%? - by Aa12 - 31.01.2016, 17:29

Forum Jump:


Users browsing this thread: 1 Guest(s)