Open DontCallMeChicken opened 3 days ago
is the file ending in a new line ?
is the file ending in a new line ?
No, the end of the file, i.e. the last line, is also the last entry. Not an empty line. I have also tested it with other text files that have existed for a long time and have always worked. The error also occurs there.
The effects and commands that use this variable no longer work correctly.
- Variable
$readFile[path\to\file.txt, last]
don't work. Nothing is output when reading the last line of a text file.- Variable
$readFile[path\to\file.txt, random]
. Only outputs the lines before the last one. If the last line appears to be output, nothing is displayed. Just like with the "last" option.
im going to ping you in discord i cant replicate this. lets see if we can diagnose it a bit?
im going to ping you in discord i cant replicate this. lets see if we can diagnose it a bit?
Okay. I'm excited! :)
firebot appends a new line on all file writes firebot when firebot tries to read in the last line or a random line the appended NewLine returns a blank entry.
this is a 2 fold issue. with the file write and file read. thank you for the info in discord. the issue is under the same tittle
Is there an existing issue for this?
Current Behavior
$readFile[path\to\file.txt, last]
don't work. Nothing is output when reading the last line of a text file.$readFile[path\to\file.txt, random]
. Only outputs the lines before the last one. If the last line appears to be output, nothing is displayed. Just like with the "last" option.Expected Behavior
The "last" option should output the last line of the specified text file. The "random" option should also output the last line of the text file.
The variable
$readFile[path\to\file.txt]
outputs the entire text file completely and correctly. These options read the text file correctly: "first" and "specific line number".The variable
$fileLineCount[path/to/file.txt]
shows the correct number of existing lines in the text file.Steps To Reproduce
No response
Version
5.62.1
What operating system are you using Firebot on?
Linux Distro
Relevant log output
Contact Details (Optional)
Discord: DCMC (dontcallmechicken.dcmc)