2,875
edits
m (Reformat total profit layout) |
m (Turn profit into zero when the value is omitted) |
||
Line 89: | Line 89: | ||
local function parseProfitMargin(minProfit, maxProfit) | local function parseProfitMargin(minProfit, maxProfit) | ||
-- Manually set maxProfit to numeric 0, only if it's nil. | |||
if maxProfit == nil then maxProfit = 0 end | |||
local min = tonumber(minProfit) | local min = tonumber(minProfit) | ||
local max = tonumber(maxProfit) | local max = tonumber(maxProfit) | ||
if | if max == nil then | ||
error("maxProfit is not a valid number.") | error("maxProfit is not a valid number.") | ||
end | end |
edits