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

Forums

  1. OpenComputers

    1. Announcements

      OpenComputers official announcements.

      120
      posts
    2. Feedback

      Tell us what you think.

      353
      posts
    3. IRC

      #OC channel discussion
      irc.esper.net #oc

      26
      posts
  2. Code Central

    1. Support

      Ask for support from the OpenComputers community

      3241
      posts
    2. Showcase

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

      2243
      posts
    3. Tutorials

      Help other users out. Please no 'false tutorials'

      101
      posts
  3. Addons & More

    1. Addons Mods

      Show off your OC addons mods

      208
      posts
    2. Architectures

      Discussions for Architectures

      172
      posts
    3. OpenEngineering Task Force

      Discussion board for the OETF documents

      66
      posts
  4. General

    1. Lounge

      Just lounge around or have an open discussion.

      296
      posts
    2. Forum Games

      Fight boredom!

      62
      posts
    3. Showcase

      Show off your creations! (not for your programs)

      124
      posts
    4. Servers

      A place to advertise your servers

      141
      posts
  5. Archives

    1. Public Archives

      OpenComputers public archive forum

      8
      posts
  • Topics

  • Posts

    • I don't think that is not possible out of the box. PS. Why are you using so outdated version of OpenComputers? Here is a link to a list of versions available for 1.7.10 (latest is on top): https://www.curseforge.com/minecraft/mc-mods/opencomputers/files?filter-game-version=2020709689%3A4449
    • well thats odd... apparently the drone tries to broadcast twice, I tweaked the code a small bit:   local computer=require("computer")
      local component=require("component") local d= component.proxy(component.list("drone")())
      local m= component.proxy(component.list("modem")())
      local r= component.proxy(component.list("radar")())
      m.open(1) while true do
      local_,_,_,_,_,rtable,mov,x,y,z = computer.pullSignal()
          if mov=="follow" then
              for k, v in pairs(r.getEntities()) do
                  m.broadcast(1,"rreeeee") - - #Le tweak
              end
          end
      end   and then got this:
      but when it tries to broadcast the 'v' entries it does this: then shuts down... maybe thats what's causing it to crash?(I'm just guessing here)... it doesn't happen outside the "for k,v in pairs()..." line:   local computer=require("computer")
      local component=require("component") local d= component.proxy(component.list("drone")())
      local m= component.proxy(component.list("modem")())
      local r= component.proxy(component.list("radar")())
      m.open(1) while true do
      local_,_,_,_,_,rtable,mov,x,y,z = computer.pullSignal()
          if mov=="follow" then
              m.broadcast(1,"skrrrrra") - - #does it once
              for k, v in pairs(r.getEntities()) do
                  m.broadcast(1,"ka") - - #does it twice
              end
              m.broadcast(1,"pa pa ka") - -#does it once
          end
      end   see:
    • what, do I just smack the drone with it?:     I don' think that the radar would give out a nil value I tried broadcasting the 'v' entries from the drone with this code:   local d= component.proxy(component.list("drone")())
      local m= component.proxy(component.list("modem")())
      local r= component.proxy(component.list("radar")())
      m.open(1) while true do
      local_,_,_,_,_,rtable,mov,x,y,z = computer.pullSignal()
          if mov=="follow" then
              for k, v in pairs(r.getEntities()) do
                  m.broadcast(1,v.name,v.distance,v.x,v.y,v.z)
              end
          end
      end   I got this in return: ...before the drone fainted again
    • Debugging drones can be difficult but the analyzer will help you get an error message from crashed programs on microcontrollers. Seeing the code and where you say it crashes.. I'd say that indexing the supposed table `v` caused the error. Indexing being `v.name` or `v.x`. I suppose if v.x or v.z or v.y are nil then drone.move will likely throw an error. But it's hard to know without more info. Get that analyzer data and come back. Hell, just wrap the whole code in pcall and collect any errors. local d= component.proxy(component.list("drone")()) local m= component.proxy(component.list("modem")()) local r= component.proxy(component.list("radar")()) m.open(1) local ok, err --# declare outside loop so we can get the value later when true do local rtable,mov,x,y,z = select(6, computer.pullSignal()) if mov == "follow" then ok, err = pcall(function() for k, v in pairs(r.getEntities()) do if v.name == "PHOBOSS" then d.move(v.x, v.y, v.z) end end end) --# pcall end if not ok then --# we have an error break --# break the while loop end end end -- # send the error back to our controller and finish m.send(ourHost, port, 'ERROR: '..(err or ""))  
    • The linked card is one of the most expensive components next to the geolyzer when it comes to energy. Coroutines are actually really efficient because all other forms i.e loops are a "busy" waiting and thus consume power running functions, evaluating... os.sleep is essentially coroutines.yield. As for remote booting you should see the doc on modem.setWakeMessage
  • Popular Contributors

×

Important Information

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