title: Run lua dissector and tap in tshark at the same time
body: <p>I have a custom dissector (written in Lua) that I am using in many aspects of my current project. </p>
  
  <p>I would also like to write a tap to perform some specific calculations for a particular task. I would like to keep this separate from the general purpose dissector for purposes of modularity.</p>
  
  <p>Is there a way to invoke a dissector and a tap, both written in Lua, from the tshark command line? More generally, can an arbitrary number of Lua scripts be invoked, and if so, will they get invoked in the correct order?</p>
  
  <p><strong>EDIT:</strong>
  I have tried invoking the two scripts from the command line:</p>
  
  <pre><code>tshark -Xlua_script:my_diss.lua -Xlua_script:my_tap.lua -r my.pcap
  </code></pre>
  
  <p>But I get an error:</p>
  
  <pre><code>tshark: Lua: Error during loading:
   [string "my_tap.lua"]:9: bad argument #1 to 'new' (Field_new: a field with this name must exist)
  </code></pre>
  
  <p>The field name that this line refers to is created in <code>my_diss.lua</code>, but it is apparently not visible when <code>my_tap.lua</code> is being loaded.</p>