Posted 05 September 2013 - 01:46 PM
My Problem is that i want to write multiple Turtle ID's or any Number really into a file using the for i = 1 , data but it only writes the last number :l
For anyone who wants to know the purpose of the code: CCpoly (Computercraft Monopoly
my code
For anyone who wants to know the purpose of the code: CCpoly (Computercraft Monopoly
my code
Spoiler
- print("How many players do you want?1 Turtle = 1 Player")
- local input = tonumber(read())
- local file = fs.open("monooptions","w")
- file.write(textutils.serialize(input))
- textutils.unserialize(input)
- file.close()
- print("Starting CCpolio")
- sleep(3)
- local bimp = fs.open("monooptions","r")
- local data = bimp.readAll()
- for i=1, data do
- local durk = fs.open("monop","w")
- print("Turtle Id")
- local derp = tonumber(read())
- durk.write(textutils.serialize(derp))
- durk.close()
- end