overextended/ox_core

Amount is not a number on Ox.RemoveAccountBalance

Closed this issue · 1 comments

When using the RemoveAccountBalance method, I get the following error message:

image

Code I am using:

local fee = Fees[class]
local player = Ox.GetPlayer(vehicle.owner)
local account = player.getAccount()

lib.print.info(type(fee), fee, account.balance)

if not Ox.RemoveAccountBalance(account.id, fee, false, locale('vehicle_impound', vehicle.plate)) then
...
end

Pretty sure this is a number though.

The account exports take objects rather than individual params as of a while ago now.

export function RemoveAccountBalance({ id, amount, overdraw = false, message }: RemoveAccountBalance) {
return UpdateBalance(id, amount, 'remove', overdraw, message);
}