Author Topic: New @readfile@ Command Doesn't Function As Expected  (Read 1998 times)

0 Members and 1 Guest are viewing this topic.

Marstead

  • Padawan
  • **
  • Posts: 51
  • Karma: +1/-0
    • View Profile
  • Twitch Name: Marstead
New @readfile@ Command Doesn't Function As Expected
« on: August 24, 2015, 12:26:10 PM »
I assumed from the update notes that this command would have your bot write to chat the text contained in the requested .txt file.

For example

Code: [Select]
@readfile@[testfile.txt]
testfile.txt has 1 line and reads :

Code: [Select]
test
However, entering this command doesn't seem to do anything. The bot doesn't respond (or crash) and adds no text in chat.

In this case, testfile.txt is in the default location (\custom logs\)

emrerocky

  • Advisor
  • Councilor
  • **
  • Posts: 1240
  • Karma: +163/-8
    • View Profile
    • emrerocky's Website
  • Twitch Name: emrerocky
Re: New @readfile@ Command Doesn't Function As Expected
« Reply #1 on: August 24, 2015, 01:04:35 PM »
The main directory for just having a file name with no path isn't the logs folder, but actually the root directory for DeepBot.

Marstead

  • Padawan
  • **
  • Posts: 51
  • Karma: +1/-0
    • View Profile
  • Twitch Name: Marstead
Re: New @readfile@ Command Doesn't Function As Expected
« Reply #2 on: August 24, 2015, 01:20:02 PM »
The main directory for just having a file name with no path isn't the logs folder, but actually the root directory for DeepBot.

Thanks! Is that unique to @readfile@? @savefile@ creates a new text file in the \custom logs\ folder, so I assumed this was the main directory/path.

Confirmed this was the issue, I changed the command to:

Code: [Select]
@readfile@[custom logs\testfile.txt]
And it worked. It might be good to assume \custom logs\ as the default directory if none is specified (as in @savefile@) instead of the root directory for DeepBot.