Posted 12 December 2018 - 05:54 AM
OK this is for something that will accompany a map I am creating, this is part of an API I'm working on, hopefully the comments are self explanatory
So basically, say this calculation equals 5.25. I want the 5.25 to become only 5 and then I want to take the remaining .25 for other calculations (since you cant give 5.25x items)
function ATMCashOutCount(amount)
cash[1] = {amount / 100} --[[returns number of items needed to
give equivalant to x number of $100 bills]]
cash[2] = --leftover decimal x100 then /50 so I can then figure out remaining change,
--More change stuff here also requiring leftover decimals from each line
end
So basically, say this calculation equals 5.25. I want the 5.25 to become only 5 and then I want to take the remaining .25 for other calculations (since you cant give 5.25x items)
Edited on 12 December 2018 - 03:20 PM