Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
  1. OpenComputers

    1. Announcements

      OpenComputers official announcements.

      128
      posts
    2. Feedback

      Tell us what you think.

      406
      posts
    3. IRC

      #OC channel discussion
      irc.esper.net #oc

      25
      posts
  2. Code Central

    1. Support

      Ask for support from the OpenComputers community

      4068
      posts
    2. Showcase

      Showcase what you have created for OC. No 'malware' or other junk!

      2852
      posts
    3. Tutorials

      Help other users out. Please no 'false tutorials'

      128
      posts
  3. Addons & More

    1. Addons Mods

      Show off your OC addons mods

      235
      posts
    2. Architectures

      Discussions for Architectures

      179
      posts
    3. OpenEngineering Task Force

      Discussion board for the OETF documents

      94
      posts
  4. General

    1. Lounge

      Just lounge around or have an open discussion.

      329
      posts
    2. Forum Games

      Fight boredom!

      68
      posts
    3. Showcase

      Show off your creations! (not for your programs)

      137
      posts
    4. Servers

      A place to advertise your servers

      148
      posts
  5. Archives

    1. Public Archives

      OpenComputers public archive forum

      8
      posts
  • Forum Upkeep

    In order to keep the forums updated with improvements and security fixes, we need to pay for a subscription.

    Currently, this is: $25/6-months for the forums itself and $10/6-months for the Theme (totalling $35 USD/6-months).

    You're not obligated to donate anything, but anything you do donate will be much appreciated. :)



    71% of donation goal reached.
    Donate Sidebar by DevFuse
  • Topics

  • Posts

    • You'll want to import the "computer" library using local computer = require("computer") As for the beep - see if you can find it in this doc page: https://ocdoc.cil.li/api:computer  
    • local rs = component.proxy(component.list(“redstone”)()) Local wr = component.proxy(component.list(“modem”)()) --[[ ^ capital letter not allowed! Use 'local' ]] wr.open(2110) local x,w,a,d,f,sent = computer.pullSignal() rs.setOutput(3,100) #output to front --[[ ^ this is a shell comment - lua will try (and fail) to parse this! Learn about Lua comments here: https://www.lua.org/pil/1.3.html ]] while true do if sent = “enon” then --[[ ^ here you've missed the distinction between '=' and '=='. While '=' is an assignment operator (such as "local a = 4") then '==' is an equality expression (such as "if sent == 'enon'") The distinction is made to prevent you from accidentally doing one when you meant the other. ]] rs.setOutput(3,100) elseif sent = “enoff” then --[[ ^ don't forget to fix this one too ]] rs.setOutput(3,0) elseif computer.energy() < 150 then rs.setOutput(3,0) end --[[ ^ you were missing an 'end' here but it was hard to tell until I added indentation. Giving the program some shape makes it easier to spot grammatical mistakes like these ]] end -- I've also removed a lot of the whitespace between each of your lines of code. Bringing it closer together makes it easier to comprehend. I've taken your code, changed the whitespace a little and annotated it with all the mistakes I spotted. Hopefully you'll be able to fix up the code yourself! Also something to beware when pasting code raw - the forum exchanges some symbols to make them more aesthetically pleasing, but this breaks your code - use the "code" button in the editor instead!   Hope this helps
    • i would love to see this work for Aunis as I have switched to using it exclusively and the mod developer is doing so much for the mod (very recently he added the Universe Stargate)
    • i cant figure out the modem commands at all, can someone help me? i just need to do x when y signal is received. something like  if(x) then computer.beep(1000,1) end  
    • Hey guys, a couple of years ago I created a few episodes of playing minecraft using only OpenComputers, I started doing that again and here is the first episode.   In the OpenComputers Challenge we are not allowed to leave the house, but we have a robot companion that can do our deeds for us.     Let me know what you think, I'd appreciate any feedback.
  • Popular Contributors

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.