Difference between revisions of "CommandBlock.runCommand"
From ComputerCraft Wiki
MKlegoman357 (Talk | contribs) (Added commandBlock.runCommand) |
MKlegoman357 (Talk | contribs) (Peripheral names in functions are now italic) |
||
Line 1: | Line 1: | ||
{{Function | {{Function | ||
− | |name=commandBlock.runCommand | + | |name=''commandBlock''.runCommand |
|api=Command Block | |api=Command Block | ||
|returns={{type|nil}} | |returns={{type|nil}} | ||
|addon=ComputerCraft | |addon=ComputerCraft | ||
− | |desc=Runs the command inside the Command Block previously set by manually editing it or by using [[commandBlock.setCommand]]() | + | |desc=Runs the command inside the Command Block previously set by manually editing it or by using [[commandBlock.setCommand|''commandBlock''.setCommand]]() |
|examples={{Example | |examples={{Example | ||
|desc=Sets the command to ''toggledownfall'' and runs it (assuming the Command Block is on the left of the [[Computer]]). | |desc=Sets the command to ''toggledownfall'' and runs it (assuming the Command Block is on the left of the [[Computer]]). |
Revision as of 13:45, 9 April 2014
Function commandBlock.runCommand | |
Runs the command inside the Command Block previously set by manually editing it or by using commandBlock.setCommand() | |
Syntax | commandBlock.runCommand() |
Returns | nil |
Part of | ComputerCraft |
API | Command Block |
Examples
Example | |
Sets the command to toggledownfall and runs it (assuming the Command Block is on the left of the Computer). | |
Code |
local commandBlock = peripheral.wrap("left") |