Berserker 
 
 
		
		
		
			
			
 
 
			
 
 
			
Posts: 16788 
	
		
	 | 
	
		
 | 
	| 03.01.2022 01:19 | 
	
		
	 | 
	
		
		Berserker 
 
 
		
		
		
			
			
 
 
			
 
 
			
Posts: 16788 
	
		
	 | 
	
		
 | 
	| 03.01.2022 01:22 | 
	
		
	 | 
	
		
		Raistlin 
 
 
		
		
		
			
			
 
 
			
 
 
			
Posts: 1344 
	
		
	 | 
	
		
 | 
	| 03.01.2022 01:36 | 
	
		
	 | 
	
		
		Archer30 
 
 
		
		
		
			
			
 
 
			
 
 
			
Posts: 1192 
	
		
	 | 
	
		
			
			 
			
				Questions about writing styles and formats
1. Do we use &(TRUE) instead of &1 for the meaning "flag 1 is 1"?, example:
 
2. We have sevral ways to create an array in ERA 3. Does any any of them requires initialization of any kind?
 
			 
			
			
  
Latest ERA mods and scripts in development -  My GitHub
			
		 |  
	 
 | 
	| 25.02.2022 10:38 | 
	
		
	 | 
	
		
		Guru105 
 
 
		
		
		
			
			
			 
			
Posts: 835 
	
		
	 | 
	
		
			
			 
			
				Archer30, синтаксис &(FALSE) будет работать неправильно, так как перекомпилируется в &0, а не &-1. 
К тому же это не улучшит, а ухудшит читаемость скрипта - не будет видно сразу, что 1 - это флаг.
			 
			
			
			
		 |  
	 
 | 
	| 25.02.2022 10:48 | 
	
		
	 | 
	
		
		Archer30 
 
 
		
		
		
			
			
 
 
			
 
 
			
Posts: 1192 
	
		
	 | 
	
		
 | 
	| 25.02.2022 10:55 | 
	
		
	 | 
	
		
		daemon_n 
 
 
		
		
		
			
			
 
 
			
 
 
			
Posts: 4366 
	
		
	 | 
	
		
 | 
	| 25.02.2022 11:31 | 
	
		
	 | 
	
		
		Archer30 
 
 
		
		
		
			
			
 
 
			
 
 
			
Posts: 1192 
	
		
	 | 
	
		
			
			 
			
				Berserker, thanks for the code! 
 
There were not many times I struggle with erm syntax, but now it is definitely the moment. It seems like my knowledge is not enough to handle erm 4, lol! 
A few questions I'd like to ask:
 
1. What is (@var)? 
2. What's the reason for using y(ptr) here? Is it not true that mixing normal y and (var:y) could result in bad things? 
3. What's wrong with my code when I try to execute the function with an array ID? I can't get to define the IF:N dialogue.
 
			 
			
			
  
Latest ERA mods and scripts in development -  My GitHub
			
				
(This post was last modified: 07.03.2022 17:18 by Archer30.)
 
			 
		 |  
	 
 | 
	| 07.03.2022 17:15 | 
	
		
	 | 
	
		
		Guru105 
 
 
		
		
		
			
			
			 
			
Posts: 835 
	
		
	 | 
	
		
			
			 
			
				Archer30, (ptr:y) это такая же переменная, как и все остальные, обозначение "ptr" используется для удобства и понимания. 
Если (ptr:y) будет перекомпилировано в y10, 
тогда y(ptr) перекомпилируется в yy10. 
Смешивания не возникает, потому что мы в обоих случаях используем одну переменную y10. 
Если я правильно понял вопрос.
			 
			
			
			
		 |  
	 
 | 
	| 09.03.2022 18:40 | 
	
		
	 |