Connection ErrorBad RequestThis page went staleSession ExpiredSign in requiredForbiddenNot FoundToo Many RequestsServer ErrorBad GatewayService UnavailableGateway TimeoutHTTP Version Not Supported
Session Expired
Your session has expired. Please log in to continue.
Sign in required
You need an account to do that. Sign in or create one — it only takes a minute.
This page went stale
Your security token was rejected, usually because the page sat open too long or you signed in elsewhere. Nothing was saved. Reload the page and try again.
Request Failed
We encountered an issue while processing your request.
Please check your internet connection and try again.
Dogenator, I answered both questions in my FAQ.
1. The script starts executing at the beginning of the first day, so the NEW\_DAY\_TRIGGER will not work for the first turn; it is not yet set at that moment. You can simply add a manual call to the first\_day() function at the end of the entire script.
2. When checking the day of the week, you can call not one function, but several:
```lua
function first_day ()
if GetDate (0) == 3 then -----Checking the day of the week (Wednesday)
function_1();
function_2();
end;
end;
```
3. And as a bonus: calling all functions in a new thread using startThread(day\_1) will work in this case, but if you are not sure why you are doing this, and you just saw it somewhere, then this is potentially a source of bugs, for example, if there is code like this:
```lua
startThread(function_1) -- some code
startThread(function_2) -- another code that assumes the code from function_1 has already been executed
```
then it will not work (or even worse, it will not always work), since these two functions are actually launched in parallel, and it is impossible to say for sure which of them will be executed first. You can simply do this:
```lua
function_1();
function_2();
РПГ-сценарий для HoMM5: Путь героя ЧаВо по созданию карт для HoMM5: ЧаВо