I don't want to seem annoying, but there's another problem with the script:I copied the code into the console, adding "@" at the beginning, and it executed – meaning it at least printed the difficulty level.
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.
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.
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога
Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4