Версия готова для тестов:
https://dropmefiles.com/VqqL8
[+] Introduced high-level fastest loops in ERM via new receivers: !!re, !!br, !!co.
!!re $1[/#2/#3/#4].
...
!!en:;
$1 - loop counter var like 'i' or 'y6'.
#2 - counter start value. Optional. Default: initial value of loop counter var.
#3 - counter stop value. Optional. Default: initial value of loop counter var.
#4 - step. Optional. Default: 1, if stop value is set, 0 otherwise.
Repeats block of code. Only the first argument is obligatory.
At first loop counter variable is initialized.
Counter stop and step values are remembered for the whole loop and won't be evaluated on each iteration.
Step determines, what value must be added to counter variable after each iteration. It also determines type of iteration stop condition.
Positive step checks if counter > stop value. Negative step checks if counter < stop value.
On !!re it's checked, if counter reached stop-value or exceeds it. If true, execution is passed to corresponding !!en block.
On !!en counter is increased by step and if stop condition is not met, next receiver after closest !!re will be executed.
If stop condition is not met, execution goes to the next receiver after closest !!re.
!!br (BREAK) with optional condition immediately jumps after loop !!en receiver.
!!co (CONTINUE) with optional condition immediately jumps to loop !!en receiver, which will be executed as usual.
Examples:
[+] Added possibility to query syntax, that was used for particular function parameter.
!!FU:S#1/?$2;
#1 - argument index
?$2 - syntax type (0 - get, 1 - set, 2 - add)
Add syntax is applied via 'd' prefix like FU:Pd200.
Using this receiver scriptmakers can write functions which act the same as normal ERM commands.
For instance, one function to get/set/add dwelling population amount.
[+] Rewritten ZvsCheckFlags routine. Now e-variables can be compared to integer variables and constants.
All logical operations are supported for strings. Variable indexes were not checked at all, but are
checked now.
[*] Replaced 'for' snippet in ERM editor with 're' snippet, other syntax file corrections.
[*] Maximum 16 nested IF/RE blocks are allowed.
[-] Fixed crash caused by invalid RD:M second parameter handling.