So I was adding a little something to my bot where you could have it save notes.
function cbnewnote(%notetitle,%s1,%s2,%s3,%s4,%s5,%s6,%s7,%s8,%s9,%s10,%s11,%s12,%s13,%s14,%s15,%s16,%s17,%s18,%s29)
{
%file = new fileobject();
%file.openforwrite("config/client/ConsoleBot/notes/"@%notetitle@".txt");
%file.writeline(%s1 SPC %s2 SPC %s3 SPC %s4 SPC %s5 SPC %s6 SPC %s7 SPC %s8 SPC %s9 SPC %s10 SPC %s11 SPC %s12 SPC %s13 SPC %s14 SPC %s15 SPC %s16 SPC %s17 SPC %s18 SPC %s19);
%file.close();
%file.delete();
echo($cbmn@"The note "@%notetitle@" saved successfully.");
}
function cbreadnote(%filename)
{
%file = new fileobject();
%file.openforread("config/client/ConsoleBot/notes/"@%filename@".txt");
%readnote = %file.readline();
echo($cbnm SPC %readnote);
%file.close();
%file.delete();
}
The reason it is spaced out like
this
is because I just took it from a part of the whole script.
So anyways, I need it to open up ConsoleBot/notes and read all the names of the files inside notes.
Could anyone help?