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

[MC 1.4.5] java errors in Computercraft?

Started by chaotaaron, 22 December 2012 - 05:56 AM
chaotaaron #1
Posted 22 December 2012 - 06:56 AM
I became an Java-error on my PC … screenshot:
[attachment=804:2012-12-21_23.47.02.png]
Its when im trying to put the computer on, the "any key" doesn't work, Ctrl+T or Ctrl+R won't work too …

PS: Be sorry with my bad english, im form Germany and its 11 pm ;)/>
Zudo #2
Posted 22 December 2012 - 07:08 AM
code?
Lyqyd #3
Posted 22 December 2012 - 07:24 AM
Please post your lua code in a new topic in the Ask a Pro section.
chaotaaron #4
Posted 22 December 2012 - 10:42 PM
Ok, code:

diskdrive="left"
rs="back"
term.setCursorPos(1,5)
print("	   +---------------------------------+ ")
print("	   |PLESE PUT CODE CARD IN DISK DRIVE| ")
print("	   +---------------------------------+ ")
while true do
if disk.getLabel(diskdrive)==code then
    rs.setOutput(rs, true)
    print("	   +---------------------------------+ ")
    print("	   |		   WELCOME !			 | ")
    print("	   +---------------------------------+ ")
end
end

I will create a new topic in "Ask a Pro".
Sammich Lord #5
Posted 22 December 2012 - 10:56 PM
'RS' is a table and in the code you declare 'RS' as a string. So 'rs.setOutput' is nil. I believe the error is because 'RS' is a wrapper for 'redstone'.
NDFJay #6
Posted 22 December 2012 - 11:06 PM
heres your problem



	(rs, true)

rs is an API pointer and cant be used as a string, re define rs="back" at the top or your code to something like rStone="back" and rs.setOutput(rs, true) to rs.setOutput(rStone, true) that should fix the error