title: ScriptJob with return variables function maya Python
body: <p>I'm running into a problem with the scriptJob command of maya: if I make a scriptJob to a function without arguments everything works fine, but if I need to pass a variable into that function that will be execute by the scriptJob It returns this error:</p>
  
  <pre><code>#Error: TypeError: file &lt;maya console&gt; line 5: Invalid arguments for flag 'ac'.  Expected ( string, string or function ), got [ str, NoneType ]#
  </code></pre>
  
  <p>The code is really simple I want just to understand why this is happening.</p>
  
  <pre><code>import maya.cmds as cmds
  
  def a():
      cube = "pCube1"
      cmds.scriptJob(ac = ["pCube2.translateY", delete(cube)])
      return cube
  
  def delete(cube):
      cmds.delete(cube)
  
  cube = a()
  a()
  </code></pre>
  
  <p>Hope you can help me.</p>