Posted 14 August 2014 - 09:05 PM
Hello out there fellow computercrafters!
So i've been fiddeling around with computercraft a lot, and decided to make a monitoring station in my powerplant where i have my big reactor turbines.
It all worked perfect, untill i updated big reactors.
We used to run with Big Reactors 0.3.0A, but decided to update to the newest version currently: Big Reactors 0.3.4A2.
After the udpate my program stopped working, it's as if it doesn't see the computer port.
When i start my program i get the error: startup:5: attempt to index ? (a nil value)
This is the code i'm using:
Also: We updated computercraft and OpenPeripheralAddons-0.1.3 to current newest version and OpenPeripheralCore-0.3.3 to the currently newest version, and the computercraft from 1.58 to the newest version which is beyond 1.6. But since computercraft and enderIO no longer worked propperly and half my code got turned into rubbish due to too many changes, we decided to downgrade to 1.5.8, 0.1.3 and 0.3.3 again. we also copied over hte old config files.
Hope someone can help out with this.
Oh yeah, also i've tried doing lua on startup and do per = peripheral.wrap("back") and then per.getConnected()
Also tried destroyingthe computer rewrite the code on a new computer etc. nothing helped.
http://ftbwiki.org/Turbine_Computer_Port
here are the codes for the peripheral.
So i've been fiddeling around with computercraft a lot, and decided to make a monitoring station in my powerplant where i have my big reactor turbines.
It all worked perfect, untill i updated big reactors.
We used to run with Big Reactors 0.3.0A, but decided to update to the newest version currently: Big Reactors 0.3.4A2.
After the udpate my program stopped working, it's as if it doesn't see the computer port.
When i start my program i get the error: startup:5: attempt to index ? (a nil value)
This is the code i'm using:
--Turbine1
turbine1 = peripheral.wrap("back")
function sendInfo()
while true do
active = turbine1.getActive() -- |Boolean | Returns true if the turbine is active (consuming hot fluid and generating power), false otherwise.
energyStored = turbine1.getEnergyStored() -- |Integer | Returns the amount of energy stored in the Multiblock Turbine's internal energy buffer, in Redstone Flux (RF) units
rotorSpeed = turbine1.getRotorSpeed() -- |Float | Returns the rotational velocity of the Multiblock Turbine's rotor, in Rotations Per Minute (RPMs)
inputAmount = turbine1.getInputAmount() -- |Integer | Returns the amount of fluid contained in the Multiblock Turbine's hot-fluid intake tank, in milli-buckets (mB)
inputType = turbine1.getInputType() -- |String or Nil| Returns the Fluid Dictionary name of the fluid contained in the Multiblock Turbine's hot-fluid intake tank, or Nil if the tank is empty
outputAmount = turbine1.getOutputAmount() -- |Integer | Returns the amount of fluid contained in the Multiblock Turbine's effluent outlet tank, in milli-buckets (mB)
outputType = turbine1.getOutputType() -- |String or Nil| Returns the Fluid Dictionary name of the fluid contained in the Multiblock Turbine's effluent outlet tank, or Nil if the tank is empty
fluidAmountMax = turbine1.getFluidAmountMax() -- |Integer | Returns the maximum amount of fluid which the Turbine's fluid tanks may contain, in milli-buckets (mB)
fluidFlowRate = turbine1.getFluidFlowRate() -- |Integer | Returns the amount of hot fluid which the turbine consumed in the last tick, in milli-buckets (mB)
fluidFlowRateMax = turbine1.getFluidFlowRateMax() -- |Integer | Returns the user setting governing the maximum desired amount of fluid for the Multiblock Turbine to consume per tick, in milli-buckets (mB)
fluidFlowRateMaxMax = turbine1.getFluidFlowRateMaxMax() -- |Integer | Returns the maximum permissible user setting for the desired fluid flow rate, in milli-buckets (mB). Normally returns 2000 mB
energyProducedLastTick = turbine1.getEnergyProducedLastTick() -- |Float | Returns the amount of energy the Multiblock Turbine produced in the last tick, in Redstone Flux (RF) units
--inductorEngaged = turbine1.getInductorEngaged() -- |Boolean | Returns true if the Multiblock Turbine's induction coils are engaged, false otherwise.
term.clear()
term.setCursorPos(1,1)print("Active:")term.setCursorPos(8,1)print(active)
term.setCursorPos(1,2)print("EnergyStored:")term.setCursorPos(14,2)print(energyStored)
term.setCursorPos(1,3)print("RotorSpeed:")term.setCursorPos(12,3)print(rotorSpeed)
term.setCursorPos(1,4)print("InputAmount:")term.setCursorPos(13,4)print(inputAmount)
term.setCursorPos(1,5)print("InputType:")term.setCursorPos(11,5)print(inputType)
term.setCursorPos(1,6)print("OutputAmount:")term.setCursorPos(14,6)print(outputAmount)
term.setCursorPos(1,7)print("OutputType:")term.setCursorPos(12,7)print(outputType)
term.setCursorPos(1,8)print("MaxFluidAmount:")term.setCursorPos(16,8)print(fluidAmountMax)
term.setCursorPos(1,9)print("FluidFlowRate:")term.setCursorPos(15,9)print(fluidFlowRate)
term.setCursorPos(1,10)print("FluidMaxFlowRate:")term.setCursorPos(18,10)print(fluidFlowRateMax)
term.setCursorPos(1,11)print("FluidMaxMaxFlowRate:")term.setCursorPos(21,11)print(fluidFlowRateMaxMax)
sleep(10)
end
end
sendInfo()
The reason it's in a loop is because i'm in the future gonna send the data via wireless modem to another pc. which has monitors ontop of it.Also: We updated computercraft and OpenPeripheralAddons-0.1.3 to current newest version and OpenPeripheralCore-0.3.3 to the currently newest version, and the computercraft from 1.58 to the newest version which is beyond 1.6. But since computercraft and enderIO no longer worked propperly and half my code got turned into rubbish due to too many changes, we decided to downgrade to 1.5.8, 0.1.3 and 0.3.3 again. we also copied over hte old config files.
Hope someone can help out with this.
Oh yeah, also i've tried doing lua on startup and do per = peripheral.wrap("back") and then per.getConnected()
Also tried destroyingthe computer rewrite the code on a new computer etc. nothing helped.
http://ftbwiki.org/Turbine_Computer_Port
here are the codes for the peripheral.