20,741
edits
Line 888: | Line 888: | ||
|param2text = The code that will be executed when the fgcommand is run. Must be a function. | |param2text = The code that will be executed when the fgcommand is run. Must be a function. | ||
|example1text = This example adds a new fgcommand and then runs it. Although it executes a simple {{func link|print()}} statement, any valid Nasal code can be used. | |example1text = This example adds a new fgcommand and then runs it. Although it executes a simple {{func link|print()}} statement, any valid Nasal code can be used. | ||
|example1 = addcommand("myFGCmd", func { | |example1 = addcommand("myFGCmd", func(node) { | ||
print("fgcommand 'myFGCmd' has been run."); | print("fgcommand 'myFGCmd' has been run."); | ||
props.dump( node ); | |||
}); | }); | ||
fgcommand("myFGCmd"); | fgcommand("myFGCmd"); |