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

jdksh

Members
  • Content Count

    1
  • Joined

  • Last visited

Posts posted by jdksh

  1. Im trying to control a nuclearcraft reactor with the rc api and threading, but when i run it freezes the whole pc

    function start()
     local thread = require("thread")
     t = thread.create(function()
      local component = require("component")
      local r = component.nc_fusion_reactor
      while(true) do
       if(r.getEfficiency() < 100) then
        r.activate()
       else
        r.deactivate()
       end
      end
     end):detach()
    end
    
    function stop()
     t:kill()
    end

     

×
×
  • Create New...

Important Information

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