Messages can also be uploaded in a separate thread.
"Script Warning" is still not an error. You didn't provide a description of the warning (or did you?).
If it's so complicated, it's better to connect through asynchronous programs. And the best thing is to share the map so we can take a look...
Everyone is a witness. I will share it :)
I did it this way: instead of entering a region and starting a battle, I placed a garrison in the town and a script that triggers when it is captured :). So, it worked, thank you.