commandblock.setCommand

 Note: The commandblock peripheral is disabled by default. You have to enable it in the config before using it.

ExampleSet command
Set command.
Code
<nowiki>
local commandblock = peripheral.find("command")
commandblock.setCommand("kill @a")
    </nowiki>

commandblock.setCommand
Function
Syntax
commandblock.setCommand(
  • command : string
)

Returns nil
API commandblock
Source CC:Tweaked (source)

Set the command of a commandblock.

This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.