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

Korbin

Members
  • Content Count

    2
  • Joined

  • Last visited

Reputation Activity

  1. Like
    Korbin reacted to Molinko in Nuclearcraft Fission reactor   
    I suspected you might be coming from python :). You might be interested in moonscript. I made a simple patch that allows programs to use the shebang syntax in OpenOS i.e
    #!/usr/bin/moon for i = 1, 5 print i unless i%2 == 0  
  2. Like
    Korbin reacted to Molinko in Nuclearcraft Fission reactor   
    There are a couple errors. The first is that the `while` keyword must be lowercase. Also within the `while` loop the if statement is missing the `end` keyword. I believe you'll also need to require the libraries you need before using them in a definition.
    local component = require "component" local sides = require "sides" local redstone = component.redstone local reactor = component.nc_fission_reactor local function GP() return reactor.getEnergyStored() end local mP, MP = 4000, reactor.getMaxEnergyStored() local MMP, CP = (MP / 4) * 3, GP() while CP > 0 do if CP > MMP then redstone.setOutput(sides.top, 15) elseif CP < mP then redstone.setOutput(sides.top, 0) end CP = GP() -- # don't forget to update the variable value within the loop end  
×
×
  • Create New...

Important Information

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