Open main menu
Home
Random
Log in
Settings
About Stardew Valley Wiki
Disclaimers
Stardew Valley Wiki
Search
Changes
← Older edit
Newer edit →
Modding:Modder Guide/APIs/Console
(view source)
Revision as of 21:12, 25 February 2022
No change in size
,
21:12, 25 February 2022
m
→Add a custom command
:
Fixed a typo in the code: money should be Money.
Line 39:
Line 39:
private void SetMoney(string command, string[] args)
private void SetMoney(string command, string[] args)
{
{
−
Game1.player.
money
= int.Parse(args[0]);
+
Game1.player.
Money
= int.Parse(args[0]);
this.Monitor.Log($"OK, set your money to {args[0]}.", LogLevel.Info);
this.Monitor.Log($"OK, set your money to {args[0]}.", LogLevel.Info);
}
}
AlSweigart
32
edits