You should at least explain to him what's the use of that Action here and there
Ok, here's the thing
By using Substring function, you will have to put 2 values inside it
Example:
Player - Add (Integer((Substring((Entered chat string), 1, 5)))) to Player 1 (Red) Current gold
What is meant by numbers
1 and
5 in there, is their position of letters for the words
Okay, let's say we follow the example of 1, 5
When I type "-gold 300", it will only take the value starts from first letter (1) until 5th letter (5)
So, if you set a variable, the variable will set a "-gold <space>"
Spaces also count as a letter, so if you want a -gold 300, to add 300 gold to your player, just
Player - Add (Integer((Substring((Entered chat string), 7, 9)))) to Player 1 (Red) Current gold
So, it will take the 7th letter until 9th letter, which in this case is 300
This include limit inside your function, if for example a player types "-gold 30000000", the trigger will only read
30000000
If you don't want a limitation to your trigger, just change the final value to
Player - Add (Integer((Substring((Entered chat string), 7, (Length of (Entered chat string)))))) to Player 1 (Red) Current gold
This will give you a no-limit addition of gold to the player (but you will still have limit for hard-coded maximum gold per player in Warcraft III Game Engine)