title: Stop script in Maxscript
body: <p>Is there a command in Maxscript that allows you to stop a script early? Say for example the script relies on having a single object as a selection. If there's nothing to select then it won't work.</p>
  
  <pre><code>myObj = $
  if ($ == undefined) then STOP
  -- rest of code
  </code></pre>
  
  <p>where STOP represents is the elusive or fictional stop command</p>
  
  <p>Rather than having to do a test like:</p>
  
  <pre><code>myObj = $
  if ($ != undefined) then
  (
  --rest of code
  )
  </code></pre>
  
  <p>Which is fine, but it does mean to put the majority of the script in brackets - which I find it makes the code a but uglier to edit.</p>