And another question: is it possible to make it so that if there is an error with one of the scripts, the rest will still be executed correctly? Because after adding this script, the script with messages for each day of the game stopped working.
Please, refer to code snippets as blocks, functions, or sections of the script, but not as scripts.
Firstly, there is a function called errorHook(sFunc). You insert it inside the function you are testing, and if there is an error inside it, the sFunc function will be executed first. But this will only help with debugging. Secondly, if an error occurs inside a function, only the subsequent lines of that function will not be executed. However: if an error occurs outside of a function and before a trigger, the trigger will not load, and the function will not be executed. Therefore, the best approach is to insert errorHook at the beginning of the script and write copies of all triggers into the sFunc function:
function Error()
Trigger(...)
Trigger(...)
...
Trigger(...)
end;
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________