DayZ 1.24
Loading...
Searching...
No Matches
PluginLocalHistoryBase.c
Go to the documentation of this file.
2{
4 {
5 m_ReadOnly = false;
6 }
7
9 {
10 }
11
12 override void OnInit()
13 {
14 super.OnInit();
15 }
16
17 override string GetFileName()
18 {
19 Error("Cannot call GetFileName on Base class PluginLocalHistoryBase");
20 return STRING_EMPTY;
21 }
22
23 void AddNewLine(string text)
24 {
25 // replace newline to \\n
26 text.Replace("\n", "\\n");
27 m_FileContent.Insert(text);
28 SaveFile();
29 }
30
32 {
33 // replace \\n to new line
35 for (int i = 0; i < m_FileContent.Count(); i++)
36 {
37 string history_record = m_FileContent.Get(i);
38 history_record.Replace("\\n", "\n");
40 }
41 return console_history;
42 }
43
45 {
46 int count = m_FileContent.Count();
47 string ret = "";
48
49 if (count > 0)
50 ret = m_FileContent.Get(count - 1);
51
52 return NULL;
53 }
54}
override string GetFileName()
void AddNewLine(string text)
void Error(string err)
Messagebox with error message.
Definition EnDebug.c:90
array< string > TStringArray
Definition EnScript.c:666
const string STRING_EMPTY
Definition constants.c:54