gold=GetPlayerResource(1,GOLD); I declared a variable.
and then I used this command to change the player's gold amount:
SetPlayerResource (1, GOLD, gold-1000);
But the command doesn't work correctly. It does change the player's gold amount, but not as it should. Instead of 3500 gold, the function gives approximately 45000.