Posted 23 June 2013 - 10:51 PM
I was testing a program, but it supplied an error(I used some sort of error handler) and it showed
"0_o How'd you do that?". I didn't type that anywhere in the code.
Here is the code
Thanks!
"0_o How'd you do that?". I didn't type that anywhere in the code.
Here is the code
tArgs = {...}
bridge = peripheral.wrap("right")
mybox = bridge.addBox(0, 0, 100, 100, 0x000000, 0.7)
bridge.clear()
mytext = bridge.addText(10, 10, "Right click the BioLock", 0xCC0000)
mytext.setColor(colors.green)
bio = peripheral.wrap("bottom")
_,prnt = os.pullEvent("biolock")
succ,err=bio.learn(tArgs[1],prnt,tArgs[2])
if succ then
print("Bioprint learned!")
speaker = peripheral.wrap("left")
speaker.speak("Bioprint learned!",1)
bridge.clear()
mytext.setColor(colors.green)
mytext.setText("Bioprint learned!")
else
print("Error learning bioprint!")
speaker = peripheral.wrap("left")
speaker.speak("Error!",1)
sleep(2)
speaker.speak(err,1)
bridge.clear()
mytext.setText("Experienced an error!")
sleep(2)
mytext.setText(err)
sleep(5)
bridge.clear()
print(err)
end
The peripherals/addons I used are- MiscPeripherals 3.3
- BioLock 2.0
- OpenPeripheral 0.1.8
Thanks!