Difference between revisions of "Redstone.getOutput"
From ComputerCraft Wiki
m (Moved to CAT:LuaCoreFunctions) |
Smiley43210 (Talk | contribs) m (Changed to use type template, does NOT return int, returns boolean, corrected example, cleared up description) |
||
Line 2: | Line 2: | ||
{{Function | {{Function | ||
|name=redstone.getOutput | |name=redstone.getOutput | ||
− | |args= | + | |args={{type|string}} side |
− | |returns= | + | |returns={{type|boolean}} |
|api=redstone | |api=redstone | ||
− | |desc=Returns what was set with [[redstone.setOutput]]. | + | |desc=Returns what was set with [[redstone.setOutput]](). |
|examples= | |examples= | ||
{{Example | {{Example | ||
− | |desc= | + | |desc=Sets the output of the left side to true, then prints the output of the left side. |
− | |code=redstone.setOutput("left", true) -- Set the output on the left to true | + | |code=redstone.setOutput("left", true) -- Set the output on the left to true |
+ | print(redstone.getOutput("left")) --Print the output | ||
}} | }} | ||
}} | }} | ||
[[Category:Lua_Core_Functions]] | [[Category:Lua_Core_Functions]] |
Revision as of 23:56, 5 May 2013
Function redstone.getOutput | |
Returns what was set with redstone.setOutput(). | |
Syntax | redstone.getOutput(string side) |
Returns | boolean |
Part of | ComputerCraft |
API | redstone |