Skip to content
#172
Auto-translated
I've started learning scripts.
Here's the first problem:
function oneF()
MessageBox("/Maps/SingleMission/Test_map3/text.txt");
Trigger(REGION_ENTER_AND_STOP_TRIGGER, "one", nil);
end;

Trigger(REGION_ENTER_AND_STOP_TRIGGER, "one", "oneF");

The trigger works (the hero stops), but the function doesn't. What's the problem?

Put heroname in parentheses. In MessageBox("/Maps/SingleMission/Test_map3/text.txt"); the error is that it should be SingleMissions, not SingleMission. The second error is that you don't need "/" before Maps.
Дайте мне всего шесть строк, написанных рукой самого честного человека, и я найду, за что его можно повесить.
Весьма хороший попутчик... До первого перекрестка.