CommandBlock.getCommand
From ComputerCraft Wiki
Revision as of 13:43, 9 April 2014 by MKlegoman357 (Talk | contribs) (Peripheral names in functions are now italic)
| Returns a string containing the command currently inside the Command Block. | |
| Syntax | commandBlock.getCommand() |
| Returns | string command currently inside the command block |
| Part of | ComputerCraft |
| API | Command Block |
Examples
| Prints current command of a command block attached on the left side of the computer (assuming the command is time set 0). | |
| Code |
local commandBlock = peripheral.wrap("left") print(commandBlock.getCommand()) |
| Output | time set 0 |