I sincerely apologize, and I might be wrong, but I have 3 questions regarding these 3 points:
1) After executing this command, did you try outputting the value of gold to the console? Does it correctly display the amount of gold, and does it match?
2) There is no way to verify the correctness of this command. But I have a thought: why not do all the calculations before executing the SetPlayerResource command... and why is there a "-" here... if you said that the player received +1000 gold?
3) Can you provide a screenshot of the console and the code itself? It can't just appear out of nowhere, 45k...
There is an error in my example, but it doesn't affect anything. If I put a '+' sign, the gold will still be displayed incorrectly.
Here are the screenshots: resource panel and console before executing this command:
And here are the screenshots after:*
Don't pay attention to the hero errors; they don't affect this.
"But I have a thought: why not do all the calculations before executing the SetPlayerResource command?" Your quote. And what specific calculations should be done?
P.s. The screenshots were uploaded strangely; if you click on them, the quality will be better