This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
tuffy45's profile picture

Magnetic card system, HELP.

Started by tuffy45, 22 September 2014 - 07:06 PM
tuffy45 #1
Posted 22 September 2014 - 09:06 PM
Hello !
First, please excuse me if i do misspellings, i'm french.
My minecraft version is 1.6.4.

Today, i created a program which aim to read a disk variable and check if it's true. If it's true, a redstone impulsion is issued on the left side of the computer.
The disk is like a magnetic card and the computer/drive like a magnetic card reader.

But, there is a bug, when i execute the program, the computer says:

startup: 3: attempt to call nil

my code in my program called access in my disk is:

access=true

and my code in my startup program in my computer is:


while true do --Always loop

  if fs.exist("disk/access") then

  shell.run("disk/access")

	if access then
	  shell.run("redpulse left -t 10")
	  disk.eject("top")
	  access=nil
	end

  end

end
Lyqyd #2
Posted 22 September 2014 - 11:13 PM
Moved to Ask a Pro.
TurtleHunter #3
Posted 22 September 2014 - 11:17 PM
Hello !
First, please excuse me if i do misspellings, i'm french.
My minecraft version is 1.6.4.

Today, i created a program which aim to read a disk variable and check if it's true. If it's true, a redstone impulsion is issued on the left side of the computer.
The disk is like a magnetic card and the computer/drive like a magnetic card reader.

But, there is a bug, when i execute the program, the computer says:

startup: 3: attempt to call nil

my code in my program called access in my disk is:

access=true

and my code in my startup program in my computer is:


while true do --Always loop

  if fs.exist("disk/access") then

  shell.run("disk/access")

	if access then
	  shell.run("redpulse left -t 10")
	  disk.eject("top")
	  access=nil
	end

  end

end

in line 3, fs.exist should be fs.exists