Gold Equaling Variable

Is there any way to change gold to equal a variable instead of increasing or decreasing by the variable?
@PokemonLyle
You can use scriptcall for that:
PHP:
// Set gold equal to game variable with id 42
$gameParty._gold = $gameVariables.value(42);
@PokemonLyle
You can use scriptcall for that:
PHP:
// Set gold equal to game variable with id 42
$gameParty._gold = $gameVariables.value(42);
Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/gold-equaling-variable.83509/