| 
                   
                			                                                     		            
                
                    
                             
                    
                
                ImponDeRable
                
             | 
				
                
                
                                
               
                	
             | 
			
			
		
				| 
		        
                
 
 
	Group: Forum Members 	        
    Posts: 3, 
    Visits: 15 
    
 
          
		     | 
				                       
                 
                
                    
			            Hello Inquisitors! 
 
 I have a relatively simple problem but could not get my head around why my approach does not work. 
 
 Inquisit documentation gives a following example of using replace() function to get randomized picture position: 
 
 <picture mypic> / items = ("foo.jpg") / position = (replace(0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100), replace(0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100)) </picture> 
 
 
 
 In my experiment I use the same syntax: <picture negpic> / items = neg / position = (replace(15, 85), 50) </picture> 
 
 but it gives me following errors: Element: picture.negpic Attribute: position Message: Setting has invalid text ', 50)'. 
 
 Element: picture.negpic Attribute:  Message: Expression 'replace(15,' is invalid. Unmatched parenthesis. 
 
 
 
 However, my parentheses are matched, I have also checked around  (before the definition of the picture and after) and everything seems to  be a legitimate Inquisit syntax. I have also tried using ';' instead of ',' or adding spaces - the error is the same. 
 
 Do you have any ideas why it might not work or what should be done to fix the problem? 
 
                  
			            				
			                                
                     
                                            
                         
                    
                  
             | 
			
			
        
				|            
                            
		     | 
						
			
			            
           
			    			
                 
                    
                 
		     | 
			
						
	           
    		
	    
				| 
                   
                			                                                     		            
                
                    
                             
                    
                
                Dave
                
             | 
				
                
                
                                
               
                	
             | 
			
			
		
				| 
		        
                
 
 
	Group: Administrators 	        
    Posts: 13K, 
    Visits: 109K 
    
 
          
		     | 
				                       
                 
                
                    
			            Where does the documentation give those examples?                 
			            				
			                                 
                     
                                            
                         
                    
                  
             | 
			
			
        
				|            
                            
		     | 
						
			
			            
           
			    			
                 
                    
                 
		     | 
			
						
	           
    		
	    
				| 
                   
                			                                                     		            
                
                    
                             
                    
                
                Dave
                
             | 
				
                
                
                                
               
                	
             | 
			
			
		
				| 
		        
                
 
 
	Group: Administrators 	        
    Posts: 13K, 
    Visits: 109K 
    
 
          
		     | 
				                       
                 
                
                    
			            To clarify, the correct way to do this would be 
 
 <block myblock> / trials = [1-10=mytrial] </block>
  <trial mytrial> / stimulusframes = [1=mytext] / validresponse = (57) </trial>
  <text mytext> / items = ("A") / hposition = replace(25%, 75%) / vposition = replace(10%, 50%, 90%) </text>
  
 
 or alternatively 
 
 <block myblock> / trials = [1-10=mytrial] </block>
  <trial mytrial> / stimulusframes = [1=mytext] / validresponse = (57) </trial>
  <text mytext> / items = ("A") / position = (expressions.randpos, 40%) </text>
  <expressions> / randpos = replace(25%, 75%) </expressions>
  
 
 The syntax in your /position attribute(s) is in fact not valid, as far as I am aware.                
			            				
			                                
                      
                                            
                         
                    
                  
             | 
			
			
        
				|            
                            
		     | 
						
			
			            
           
			    			
                 
                    
                 
		     | 
			
						
	           
    		
	    
				| 
                   
                			                                                     		            
                
                    
                             
                    
                
                ImponDeRable
                
             | 
				
                
                
                                
               
                	
             | 
			
			
		
				| 
		        
                
 
 
	Group: Forum Members 	        
    Posts: 3, 
    Visits: 15 
    
 
          
		     | 
				                       
                 
                
                    
			            By documentation I mean the full documentation of inquisit objects, otherwise known as help. :) You can find it under: Help --> Table of contents 
 
 then in the table of contents: Language Reference --> Expressions --> Functions
  And then under selection functions there are examples where this way of using replace() is presented.                 
			            				
			                                
                     
                                            
                         
                    
                  
             | 
			
			
        
				|            
                            
		     | 
						
			
			            
           
			    			
                 
                    
                 
		     | 
			
						
	           
    		
	    
				| 
                   
                			                                                     		            
                
                    
                             
                    
                
                Dave
                
             | 
				
                
                
                                
               
                	
             | 
			
			
		
				| 
		        
                
 
 
	Group: Administrators 	        
    Posts: 13K, 
    Visits: 109K 
    
 
          
		     | 
				                       
                 
                
                    
			            Yes, I am well aware of the functions reference. However, I don't think any example gives the use case you are alleging in the /position attribute: "Inquisit documentation gives a following example of using replace() function to get randomized picture position: 
 
 <picture mypic> / items = ("foo.jpg") / position = (replace(0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100), replace(0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100)) </picture>"
 
 
 I have posted valid examples in my previous response.                  
			            				
			                                
                     
                                            
                         
                    
                  
             | 
			
			
        
				|            
                            
		     | 
						
			
			            
           
			    			
                 
                    
                 
		     | 
			
						
	           
    		
	    
				| 
                   
                			                                                     		            
                
                    
                             
                    
                
                Dave
                
             | 
				
                
                
                                
               
                	
             | 
			
			
		
				| 
		        
                
 
 
	Group: Administrators 	        
    Posts: 13K, 
    Visits: 109K 
    
 
          
		     | 
				                       
                 
                
                    
			            I stand corrected. The functions reference does indeed give that flawed example, which I had overlooked at first. Thanks for pointing this out -- I will make sure the example gets replaced with a valid one.                 
			            				
			                                 
                     
                                            
                         
                    
                  
             | 
			
			
        
				|            
                            
		     | 
						
			
			            
           
			    			
                 
                    
                 
		     | 
			
						
	           
    		
	    
				| 
                   
                			                                                     		            
                
                    
                             
                    
                
                ImponDeRable
                
             | 
				
                
                
                                
               
                	
             | 
			
			
		
				| 
		        
                
 
 
	Group: Forum Members 	        
    Posts: 3, 
    Visits: 15 
    
 
          
		     | 
				                       
                 
                
                    
			            Thanks a lot, Dave! Especially for the correct examples that you've posted before in this tread, they will save me some time.                
			            				
			                                 
                     
                                            
                         
                    
                  
             | 
			
			
        
				|            
                            
		     | 
						
			
			            
           
			    			
                 
                    
                 
		     | 
			
						
	           
    		
	    
				| 
                   
                			                                                     		            
                
                    
                             
                    
                
                seandr
                
             | 
				
                
                
                                
               
                	
             | 
			
			
		
				| 
		        
                
 
 
	Group: Administrators 	        
    Posts: 1.3K, 
    Visits: 6K 
    
 
          
		     | 
				                       
                 
                
                    
			            Documentation will be corrected in the next update.                 
			            				
			                                
                     
                                            
                         
                    
                  
             | 
			
			
        
				|            
                            
		     | 
						
			
			            
           
			    			
                 
                    
                 
		     |