3 posts
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 ;)/>
1114 posts
Location
UK
Posted 22 December 2012 - 07:08 AM
code?
8543 posts
Posted 22 December 2012 - 07:24 AM
Please post your lua code in a new topic in the Ask a Pro section.
3 posts
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".
1214 posts
Location
The Sammich Kingdom
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'.
212 posts
Location
Leeds, England
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