[Command] convertToLocalCurrency

Post Reply
User avatar
Raddeck
LP Manager
Reactions: 1
Posts: 508
Joined: Sat Oct 16, 2021 6:22 pm
Location: LpWorld
Contact:

Post by Raddeck »

Float.convertToLocalCurrency()


USE
Converts a dollar value to the local currency for the home city in string format.


TYPE: Command, non-Ref (syntax is ref-like)
RETURNS: String, expressing the number in local currency
THEME: Money
COMPARE: getRent, getSalary, setRent, setSalary


EXAMPLE:

Code: Select all

    Salary = 3000
    SalaryConverted = Salary.convertToLocalCurrency()
    "My salary is <SalaryConverted>."  // will show up as 'My salary is £ 2000.'
	
	SalaryConverted = Salary.convertToLocalCurrency(true)
Like my work? Buy me a coffee or support me on Patreon to keep it coming. :ugeek:
-Don't PM me for support-
Top
Post Reply