<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Error running script first time &amp;quot;-- Type error : Call needs function or class, got: undefined&amp;quot; in 3ds Max Programming Forum</title>
    <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/error-running-script-first-time-quot-type-error-call-needs/m-p/10985345#M4403</link>
    <description>&lt;P&gt;&lt;FONT color="#800000"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;ResetTheXform()&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800000"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;ResetThePivotRotation()&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800000"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;SetPivotToZero()&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800000"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;RemoveCustomAttributes()&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800000"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;ReposObject()&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;all of these functions you must define before defining the rollout&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 05 Mar 2022 02:40:31 GMT</pubDate>
    <dc:creator>denisT.MaxDoctor</dc:creator>
    <dc:date>2022-03-05T02:40:31Z</dc:date>
    <item>
      <title>Error running script first time "-- Type error : Call needs function or class, got: undefined"</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/error-running-script-first-time-quot-type-error-call-needs/m-p/10985034#M4402</link>
      <description>&lt;P&gt;I run this script through the script editor - there's no problem with the script itself, but running a function through buttonpressed - there are five buttons. I run with ctrl + E, and the first time I press the button it comes up with this error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jibijib_0-1646429891361.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1032690i027E5BB1D3FC2687/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jibijib_0-1646429891361.png" alt="jibijib_0-1646429891361.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The process in question is simple, and should work, but produces an error the first time it is run:&lt;/P&gt;&lt;P&gt;Rollout MeshTools "Mesh Tools"&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#800000"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800000"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;button resetTheXformButton "Reset Xform" pos: [2,0] width:250 height:40&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800000"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;button resetRotationButton "Reset Pivot Rotation" pos: [2,40] width:250 height:40&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800000"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;button setPivotToZeroButton "Set Pivot To Centre/Ground 0" pos: [2,80] width:250 height:40&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800000"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;button removeCustomAttributesButton "Remove Custom Attributes" pos: [2,120] width:250 height:40&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800000"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;button reposButton "Reposition Object at z:0" pos: [2,160] width:240 height:40&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#800000"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;on resetTheXformButton pressed do&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800000"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800000"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;ResetTheXform()&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800000"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800000"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;on resetRotationButton pressed do&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800000"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800000"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;ResetThePivotRotation()&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800000"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800000"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;on setPivotToZeroButton pressed do&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800000"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800000"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;SetPivotToZero()&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800000"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800000"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;on removeCustomAttributesButton pressed do&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800000"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800000"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;RemoveCustomAttributes()&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800000"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#800000"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;on reposButton pressed do&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800000"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800000"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;ReposObject()&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800000"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800000"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I re-run it, it works fine every time afterwards. What is the problem here - is it running through the editor the problem?&lt;/P&gt;</description>
      <pubDate>Fri, 04 Mar 2022 21:40:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/error-running-script-first-time-quot-type-error-call-needs/m-p/10985034#M4402</guid>
      <dc:creator>jibijib</dc:creator>
      <dc:date>2022-03-04T21:40:07Z</dc:date>
    </item>
    <item>
      <title>Re: Error running script first time "-- Type error : Call needs function or class, got: undefined"</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/error-running-script-first-time-quot-type-error-call-needs/m-p/10985345#M4403</link>
      <description>&lt;P&gt;&lt;FONT color="#800000"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;ResetTheXform()&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800000"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;ResetThePivotRotation()&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800000"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;SetPivotToZero()&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800000"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;RemoveCustomAttributes()&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800000"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;ReposObject()&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;all of these functions you must define before defining the rollout&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 05 Mar 2022 02:40:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/error-running-script-first-time-quot-type-error-call-needs/m-p/10985345#M4403</guid>
      <dc:creator>denisT.MaxDoctor</dc:creator>
      <dc:date>2022-03-05T02:40:31Z</dc:date>
    </item>
  </channel>
</rss>

