I'm sorry if this topic has already been treated, but I could not find in previosu discussion.
I'm trying to print in Celestia the content of a txt file
I wanted to use the io.open function in order to read the txt file. This is the basic code I use
Code: Select all
propagationFile = assert(io.open("propagation.txt", "r"))
propagation= propagationFile:read()
io.close()
but anything I get is an error saying
with I put assert that no such file or directory (the error is [String "...path..."]:4: propagation.txt: No such file or directory)
when I do not put assert something like attempt to call field 'open' (a nil value)
Is there any special grammar to be used to open the file or to declare where the file resides that I did not get? The file is in the same repository than the script, which is nested into the extra folder of Celestia.
Thanks to anybody willing to provide me a clue.