title: GMS2 - Why am I getting this syntax error?
body: <p>I made an inventory system(other is the drop) and here is the pickup code</p>
  
  <pre><code>    // pickup
  
      found_in_inv = false;
  
      for(var i = 0; i &lt; ds_list_size(global.inv); i++){
          if(global.inv[| i][| 0] == other.object_index){ // error line
              global.inv[| i][| 1]++;
              found_in_inv = true;
              break;
          }
      }
  
      if(found_in_inv){
          instance_destroy(other);
      }else{
          for(var i = 0; i &lt; ds_list_size(global.inv); i++){
              if(global.inv[| i][| 0] == noone){
                  global.inv[| i][| 0] = other.object_index;
                  global.inv[| i][| 1] = 1;
                  break;
                  instance_destroy(other);
              }
          }
      }
  </code></pre>
  
  <p>I am getting a syntax error where "[|" found, ")" expected. I don't know how to fix this, please help.</p>