←  Ask a Pro

ComputerCraft | Programmable Computers for Minecraft

»

bit:40: bad argument: double expected, got...

TGC_Robin's Photo TGC_Robin 21 Dec 2015

Hello,
I am building a nuclear powerplant and I was writing a code.
But I get this Message: "bit:40: bad argument: double expected, got nil"
Can somebody explain where I did wrong?
Here is the code:
monitor = peripheral.wrap("back")
monitor.clear()
monitor.setTextScale(2)
monitor.setCursorPos(1,1)
if colors.test( c, colors.black) == true then
monitor.setCursorPos(1,1)
monitor.write("powerPlant overheating = true")
else
monitor.setCursorPos(1,1)
monitor.write("powerPlant overheating = false")
end

note:
I am playing in Tekkit.
so it is computercraft 1.33
Quote

Lyqyd's Photo Lyqyd 21 Dec 2015

You haven't defined the variable c anywhere.
Quote