Skip to content
User Avatar
#3480
Auto-translated
Andrei_21
I don't want to seem annoying, but there's another problem with the script:

function Diff_setup()
slozhnost = GetDifficulty();
if slozhnost == DIFFICULTY_EASY  then
print("easy");
startThread(sloz_easy);
elseif slozhnost == DIFFICULTY_NORMAL then
print("norm");
startThread(sloz_norm);
elseif slozhnost == DIFFICULTY_HARD then
print("hard");
startThread(sloz_hard);
elseif slozhnost == DIFFICULTY_HEROIC then
print("hero");
startThread(sloz_hero);
end;
end;

function sloz_easy()
if (GetDate( DAY ) == 31) then
SetRegionBlocked("blok", nil, 4);
end;
end;

function sloz_norm()
if (GetDate( DAY ) == 28) then
SetRegionBlocked("blok", nil, 4);
end;
end;

function sloz_hard()
if (GetDate( DAY ) == 14) then
SetRegionBlocked("blok", nil, 4);
end;
end;

function sloz_hero()
if (GetDate( DAY ) == 12) then
SetRegionBlocked("blok", nil, 4);
end;
end;

startThread(Diff_setup);

The console throws an error.

I copied the code into the console, adding "@" at the beginning, and it executed – meaning it at least printed the difficulty level.
If this isn't the entire code, then the error is probably in something else.
By the way, the code probably doesn't work the way you expect it to.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4