Auto-translated
Good day, I'm having trouble again with simple scripts that display text messages :(
For some reason, when I write a script like this:
--Starting messages
path=GetMapDataPath();
MessageBox(path.."message-day1.txt");
function newday()
if GetDate(DAY)==2 then
MessageBox(path.."message-day2.txt");
end;
end;
Trigger(NEW_DAY_TRIGGER, "newday");
everything works perfectly, but when I try to expand these messages to include several other days:
--Starting messages
path=GetMapDataPath();
MessageBox(path.."message-day1.txt");
function newday()
if GetDate(DAY)==2 then
MessageBox(path.."message-day2.txt");
if GetDate(DAY)==3 then
MessageBox(path.."message-day3.txt");
if GetDate(DAY)==7 then
MessageBox(path.."message-day7.txt");
if GetDate(DAY)==9 then
MessageBox(path.."message-day9.txt");
end;
end;
Trigger(NEW_DAY_TRIGGER, "newday");
nothing happens, not even the initial message loads. Of course, the text documents with the desired names have been created:)