Jump to content




ArrayIndexOutOfBoundsException in Security Program


  • You cannot reply to this topic
1 reply to this topic

#1 Faceboji

  • New Members
  • 1 posts

Posted 19 August 2012 - 04:37 PM

Hello, I am having a problem with my Security System Server. It works for a short amount of time, and then gives me this:

bios:38: vm error:
java.lang.ArrayIndexOutOfBoundsException

I don't know that much about ComputerCraft, so for all I know there could be something real obvious causing the problem. Here is the program:

function lock()
term.clear()
term.setCursorPos(1,1)
print("												 ")
print(" ########## ### ########## ########## ########## ")
print(" ########## ### ########## ########## ########## ")
print(" ####	## ### ####	## ####	## ##		 ")
print(" ####	## ### ####	## ####	## ##		 ")
print(" ########   ### ########## ########## ########## ")
print(" ########   ### ########## ########## ########## ")
print(" ####	## ### ####	   ####			   ## ")
print(" ####	## ### ####	   ####			   ## ")
print(" ########## ### ####	   ####	   ########## ")
print(" ########## ### ####	   ####	   ########## ")
print("												 ")
print("   BOJI INDUSTRIES  PASSWORD PROTECTION SYSTEM   ")
print("			 BUSINESS SERVER EDITION			 ")
print("		VERSION 3.8 DEVELOPED BY FACEBOJI		")
print("												 ")
os.pullEvent = os.pullEventRaw
code = "alarmoff"
redstone.getInput ("left")
if redstone.getInput ("left") == true then
redstone.setOutput ("back", true )
print("												 ")
print("  INPUT ALARM SHUTDOWN CODE  TO SHUTDOWN ALARMS  ")
print("												 ")
write "  ALARM SHUTDOWN CODE: "
input = read()
if input == code then
redstone.setOutput ("back", false )
lock()
else
end
else
sleep(1)
lock()
end
end
lock()

I hope someone can help!

#2 sjele

  • Members
  • 334 posts
  • LocationSomewhere on the planet called earth

Posted 19 August 2012 - 05:01 PM

I belive it is caused by calling lock() inside the function lock()

More info:
http://www.computerc...laying-2/#AIOOB

This might work. (not tested) : http://pastebin.com/8wwbJGzi





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users