How to change by script the Currency Unit, please..?

I'm trying to incorporate a dual Currency into my Game, but have some slight difficulties. The first is in changing the default \G value from 'Gold' in the Database to 'Quartz', for instance. I've been using the script call $dataSystem.currencyUnit=="Quartz", but when I display using \G, I still get 'Gold'. What have I overlooked, please..? I'm using RPGMV.


Edit: I found my mistake; it's the "==" that is wrong, sometimes, it should be "=", sometimes. One day I will understand why this syntax stuff is made so confusingly (but not today..! ;-) )
If i helps...

  • = : This sets the left side to the value on the right.
  • == : This compares the value on the left side to the right side and returns true or false based on if the are equivalent.
  • === : This (in JavaScript, at least) compares both the values, as above, but also compares the type. If you compare a character that says A to a string that says A, it will return false, while the == comparator will return true.
If i helps...

  • = : This sets the left side to the value on the right.
  • == : This compares the value on the left side to the right side and returns true or false based on if the are equivalent.
  • === : This (in JavaScript, at least) compares both the values, as above, but also compares the type. If you compare a character that says A to a string that says A, it will return false, while the == comparator will return true.



Indeed it does, and thank you.


(;;;but it's still just as confusing as the word 'right' in the English language. Right or wrong..? Right or left..? A right Charlie..? Oh well, it's only maths, I suppose..! ;-) )

Original thread: https://forums.rpgmakerweb.com/threads/how-to-change-by-script-the-currency-unit-please.65701/