Help with Purchase Prices

(VX Ace)
Anyone has any idea what I'm doing wrong? I'm trying to change the formula in Scene_Shop, but the game is not taking it into account, and I have no idea why.

def buying_price
(@buy_window.price(@ItEm) * (100/(100 - $game_variables[161] * 2) ) ).to_i
end

(Variable mentioned is a haggling stat the player can raise, max it can reach is 8, so the player can basically get a 16% discount.)
My first guess would be that Ruby distinguishes between integer and floating point arithmetic.
If you divide two numbers, the result will be rounded down to an integer unless one of the operands is considered a floating point number:

So for instance
100 / 92 => 1
while
100.0 / 92 => 1.0869...

Edit: Didn't see this question has already been answered in another thread... Woops

Closing since this is a duplicate.

Original thread: https://forums.rpgmakerweb.com/threads/help-with-purchase-prices.133202/