r/ComputerCraft • u/Avatarfreak345 • Jan 24 '17
Computercraft code help
The code lies here: http://pastebin.com/FcJcPg3s
2
Upvotes
r/ComputerCraft • u/Avatarfreak345 • Jan 24 '17
The code lies here: http://pastebin.com/FcJcPg3s
2
u/ValorCat Jan 25 '17
I'm not completely sure I understand what you're trying to do, but right away I see this:
This is setting the variable
inputto the value ofusername, which is nil. You want it the other way around:Or really just:
to save yourself a line. Same thing with setting the password.
This won't let you access the
usernameandpasswordvariables in another file, if that's what you're going for, but it's a start. If you want to access the username and password in another file, you have to eithermake the other file an API, then load it into this file with
os.loadAPI(name), orsave the username and password into a file, then run have the other program access the file.
Does that make sense? Feel free to ask me questions; I'm a programmer, but it's been a little while since I've done Lua or ComputerCraft.