|
Scripting Unleashed - Scripting Syntax |
Top Previous Next |
|
Commands are most important part of code lines. Using commands, you tell MMB what to do in line you're writing. A kind of electronic army : you're an officer and MMB is just a soldier, executing your ideas ! ;) Of course - pay attention to expressing ideas ! As a difference from the real-life army where command like... Down soldier ! Gimme 50 ! ...is taken for granted, resulting in 50 push-ups performed by soldier...MMB would ask... ...50 of what !?...
Yeah, yeah, you already know how it goes when working with these machines - you gotta explain, specify, draw everything to 'em and they still dare to ask questions ! So let's see what we must do to keep MMB quiet & kickin'... There are more kinds of commands.
Hey, don't run away just yet - they're basically the same ;) Every command comes with unique name: JoeIsMyName ...followed by both parenthesis: () ...put together, every command at least looks like this: JoeIsMyName () Are there commands like this above in MMB ? Yes. Are there different commands than this above ? Yes.
Just like you can have vase with or without flowers - you can have commands with parameters or without parameters. Here's a summary of command styles in MMB:
These are just general command styles - read explanation of every command in particular to learn what it requires.
Parameters provide extra info required by some commands; is it natural to put flowers in vase ? Yes. Is it natural for some commands to require flowers... oops, parameters ? Yes ;) Long live the diversity - there are many kinds of parameters:
You'll learn all about 'em later. Notice how parameters are divided from the rest of the command - using quotes. If there are more parameters, they're divided with commas: CommandName("param1","param2")
Here comes another important fact about commands and code lines: You enter MMB script commands in rows, one after another, and you can enter as many lines as you like. As long as code lines follow script syntax, MMB won't mind having large number of lines. And one about code line writing: Writing of commands in MMB is not case-sensitive. Meaning, you can either write: CommandName("param1","param2") or: COMMANDName("param1","param2") MMB will eat it and automatically adjust letter cases. This works for command names only (parameters/variables are case-sensitive).
|