i know that "attempt to index local "reader" (a nil value)" means that i try to call/read a value that didnt exist but i dont know what im doing worng in my code
print("program started")
local reader = peripheral.find("ship_reader")
redstone.setOutput("top",true)
while true do
repeat
local result = reader.getWorldspacePosition()
sleep(0.1)
until (result.y == 90)
redstone.setOutput("top",false)
end
Reader is nil, which means that the peripheral was not found. "ship_reader might not be the correct peripheral type, your network may not be set up correctly, or you could be missing a compatibility mod.