I want to make a simple program that reads files inside a floppy.
It could be used for MANY things including money, locks, adventure maps, and a ton more!
But I haven't found any function that lets me read a file or set a variable as a line of a file. Anyone know what i could do?
I'm currently using labels for this with the disk api... Just to get a simple password type program going...
thanks for any help,
-anidude98
1
File Reading?
Started by anidude98, Feb 08 2012 10:00 PM
7 replies to this topic
#1
Posted 08 February 2012 - 10:00 PM
#2
Posted 09 February 2012 - 12:48 AM
Some starting pointers:
In ComputerCraft type: help fs
Read about I/O in LUA:
http://www.lua.org/pil/21.1.html
You can use ComputerCraft's fs.open() instead of LUA's io.open(), but with the latter you can do things like io.read("*a").
Don't know if you can do the latter in same other way with fs.open() as well though. Only know how it works with LUA.
K, hope this sets you on the right path. Have fun exploring! />
In ComputerCraft type: help fs
Read about I/O in LUA:
http://www.lua.org/pil/21.1.html
You can use ComputerCraft's fs.open() instead of LUA's io.open(), but with the latter you can do things like io.read("*a").
Don't know if you can do the latter in same other way with fs.open() as well though. Only know how it works with LUA.
K, hope this sets you on the right path. Have fun exploring! />
#3
Posted 09 February 2012 - 06:12 AM
Espen, on 09 February 2012 - 12:48 AM, said:
Some starting pointers:
In ComputerCraft type: help fs
Read about I/O in LUA:
http://www.lua.org/pil/21.1.html
You can use ComputerCraft's fs.open() instead of LUA's io.open(), but with the latter you can do things like io.read("*a").
Don't know if you can do the latter in same other way with fs.open() as well though. Only know how it works with LUA.
K, hope this sets you on the right path. Have fun exploring! />
In ComputerCraft type: help fs
Read about I/O in LUA:
http://www.lua.org/pil/21.1.html
You can use ComputerCraft's fs.open() instead of LUA's io.open(), but with the latter you can do things like io.read("*a").
Don't know if you can do the latter in same other way with fs.open() as well though. Only know how it works with LUA.
K, hope this sets you on the right path. Have fun exploring! />
Actually i found this out on irc, Now im going to learn about hiding information so it cant be read without being decoded. then i can make a real money system for a server... connect all the computers on my server to one computer holding all data for all users... basically a bank program...
#4
Posted 09 February 2012 - 06:36 AM
theres a lock program designed that already uses this idea, you should look into it to see how the person reads the file
You can probably get some good ideas as to how to string it together
http://www.computerc...-misc-programs/
You can probably get some good ideas as to how to string it together
http://www.computerc...-misc-programs/
#5
Posted 09 February 2012 - 06:30 PM
Selkitty, on 09 February 2012 - 06:36 AM, said:
theres a lock program designed that already uses this idea, you should look into it to see how the person reads the file
You can probably get some good ideas as to how to string it together
http://www.computerc...-misc-programs/
You can probably get some good ideas as to how to string it together
http://www.computerc...-misc-programs/
are you refering to the reading files from a disk?
or the encoding the files?
#6
Posted 10 February 2012 - 05:02 AM
anidude98, on 09 February 2012 - 06:30 PM, said:
Selkitty, on 09 February 2012 - 06:36 AM, said:
theres a lock program designed that already uses this idea, you should look into it to see how the person reads the file
You can probably get some good ideas as to how to string it together
http://www.computerc...-misc-programs/
You can probably get some good ideas as to how to string it together
http://www.computerc...-misc-programs/
are you refering to the reading files from a disk?
or the encoding the files?
this program reads the files on the disk looking for a passcode.
#7
Posted 31 May 2013 - 03:35 PM
anidude98, on 09 February 2012 - 06:12 AM, said:
Actually i found this out on irc, Now im going to learn about hiding information so it cant be read without being decoded. then i can make a real money system for a server... connect all the computers on my server to one computer holding all data for all users... basically a bank program...
http://www.computerc...__fromsearch__1
Might be useful. Or:
http://www.computerc...__fromsearch__1
Which has AES and some others, as well as a Secure Rednet Tunnel api that might be good for sending data over rednet.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users