mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-24 00:26:55 +00:00
api: handle empty money strings
This commit is contained in:
@@ -358,6 +358,8 @@ end
|
||||
-- return: [string] a colorized string which is split into
|
||||
-- gold,silver and copper values.
|
||||
function pfUI.api.CreateGoldString(money)
|
||||
if type(money) ~= "number" then return "-" end
|
||||
|
||||
local gold = floor(money/ 100 / 100)
|
||||
local silver = floor(mod((money/100),100))
|
||||
local copper = floor(mod(money,100))
|
||||
|
||||
Reference in New Issue
Block a user