I moved your post to the Servo controllers and servos section of the forum since it is specific to the Maestro.
The Maestro scripting language is based on a programming language called Forth, so you might find it helpful to get some understanding of that first if it is new to you; it uses a stack mechanism to keep track of values, and does not support stored variables like you are probably used to. In my experience, the best way to learn it is to try it out. You can look through the “Command Reference” section of the guide to get an idea of the available commands. Then, I recommend running some of the scripts in the “Example Scripts” section. The “Step script” button in the “Script” tab of the Maestro Control Center can be very helpful for slowing down the execution of the script and figuring out how each command is working. You can see the values on the stack on the right-hand side of the window. Additionally, note that you can run the examples that use servos without servos actually attached and use the “Status” tab to see what the outputs are doing.
As far as your question about subroutines, commands are not passed to and from subroutines, but the subroutine will execute any commands it contains when it is called. The values on the stack will still be there when a subroutine is called, so for example, if your subroutine contains a command like
0 servo (which is missing a target position that should come before the 0), it will use the next value on the stack as its target. You can see this done in the first example script under the “Compressing the sequence” heading of the same “Example Scripts” section of the user’s guide.
If you have any specific questions or examples that you are having problems figuring out, I would be happy to try to help explain them in more detail.