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

fs.open() Help [Error]

Started by shipmaster4000, 04 July 2012 - 08:02 AM
shipmaster4000 #1
Posted 04 July 2012 - 10:02 AM
Hello ive recently made a program that uses fs.open()…
The program basicly is
i = fs.open("startup","w")
i.write("print("dog")")
i.close()

Now the problem is, it comes with error, that at line 2 ")" was expected. I have no clue how to fix that…
Any solutions?
Deathknight0897 #2
Posted 04 July 2012 - 11:42 AM
u have missed an end bracket ) check ur code


i = fs.open("startup","w")
i.write("print"("dog"))
i.close()
try that not sure though

is that your code or is that example of your code cause really u should use the code button just below smileys
Kolpa #3
Posted 04 July 2012 - 11:56 AM
u have missed an end bracket ) check ur code


i = fs.open("startup","w")
i.write("print"("dog"))
i.close()
try that not sure though

is that your code or is that example of your code cause really u should use the code button just below smileys
dammit guys u cant stack strings :/ the " is the Representative of a quote in a string

i = fs.open("startup","w")
i.write("print("dog")")
i.close()
Deathknight0897 #4
Posted 04 July 2012 - 12:03 PM
smile and wave boys smile and wave
:P/>/>
Kolpa #5
Posted 04 July 2012 - 12:24 PM
smile and wave boys smile and wave
:P/>/>