Difference between revisions of "Redstone.getSides"

From ComputerCraft Wiki
Jump to: navigation, search
(Created page with "{{lowercase}} {{Function |name=redstone.getSides |args= |returns=table list of valid sides |api=redstone |examples= {{Example |desc=Prints all valid sides |code=for k,v in...")
 
Line 8: Line 8:
 
{{Example
 
{{Example
 
|desc=Prints all valid sides
 
|desc=Prints all valid sides
|code=for k,v in ipairs(redstone.getSides()) do
+
|code=for k,v in pairs(redstone.getSides()) do
 
   print(v)
 
   print(v)
 
  end
 
  end

Revision as of 01:40, 1 April 2012


Grid Redstone.png  Function redstone.getSides
No description provided.
Syntax redstone.getSides()
Returns table list of valid sides
Part of ComputerCraft
API redstone

Examples

Grid paper.png  Example
Prints all valid sides
Code
for k,v in pairs(redstone.getSides()) do
 print(v)
end
Output A list of all valid sides (top, bottom, left, right, front and back)