<?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: Invalid Parameter Name?  What?!? in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/Invalid-Parameter-Name-What/m-p/46887#M33339</link>
    <description>&lt;BLOCKQUOTE&gt;Jay wrote:&lt;BR /&gt;John had the winning answer.  First I added a Test parameter and used Test in the code instead of pFrameGuage, and it worked.  So I deleted the original pFrameGuage parameter and renamed Test to pFrameGuage -- it worked.&lt;BR /&gt;
&lt;BR /&gt;
The moral of this story is...&lt;BR /&gt;
&lt;BR /&gt;
If the GDL interpreter doesn't like one of your parameters -- even though it should -- throw the parameter away and try again.  Don't question why -- it will just drive you crazy!  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_eek.gif" style="display : inline;" /&gt;&lt;/BLOCKQUOTE&gt;
Good to hear Jay&lt;BR /&gt;
Just a tip - make sure you dont save the object while the parameter is missing and open a project as any modified parameters of that variable (in a placed object) will be lost.</description>
    <pubDate>Sun, 30 Jul 2006 22:54:29 GMT</pubDate>
    <dc:creator>Aussie John</dc:creator>
    <dc:date>2006-07-30T22:54:29Z</dc:date>
    <item>
      <title>Invalid Parameter Name?  What?!?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Invalid-Parameter-Name-What/m-p/46881#M33333</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;R&gt;In the Master script of a door object I am building, I want to put the following code: 
&lt;PRE&gt;IF pFrameType = `HM` THEN 
	PARAMETERS pFrameGuage = `16` 
ELSE 
	PARAMETERS pFrameGuage = `18` 
ENDIF&lt;/PRE&gt; &lt;BR /&gt;
Simple enough, right?  When I check the script with the Check Script button, it complains that "'PFRAMEGUAGE' isn't a valid parameter name" on the fourth line -- the one that attempts to set it to `18`.  This means that it accepted the second line which sets it to `16`.  I've done this same code snippet with several other variables and they all work -- just not this one. &lt;BR /&gt;
 &lt;BR /&gt;
I tried: 
&lt;PRE&gt;IF pFrameType = `HM` THEN 
	PARAMETERS pFrameGuage = `16` 
ENDIF 
IF pFrameType &amp;lt;&amp;gt; `HM` THEN 
	PARAMETERS pFrameGuage = `18` 
ENDIF&lt;/PRE&gt; &lt;BR /&gt;
...and Check Script complained. &lt;BR /&gt;
 &lt;BR /&gt;
I tried: 
&lt;PRE&gt;PARAMETERS pFrameGuage = `18` 
IF pFrameType = `HM` THEN 
	PARAMETERS pFrameGuage = `16` 
ENDIF&lt;/PRE&gt; &lt;BR /&gt;
...and Check Script complained about the first line, but if I click Continue, it doesn't complain about the third line. &lt;BR /&gt;
 &lt;BR /&gt;
I tried: 
&lt;PRE&gt;IF pFrameType = `HM` THEN 
	temp = `16` 
ELSE 
	temp = `18` 
ENDIF 
PARAMETERS pFrameGuage = temp&lt;/PRE&gt; &lt;BR /&gt;
...and Check Script complained about the last line. &lt;BR /&gt;
 &lt;BR /&gt;
Now for the strangest part.  If I take the "ELSE" line out of the first example so the code looks like the following: 
&lt;PRE&gt;IF pFrameType = `HM` THEN 
	PARAMETERS pFrameGuage = `16` 
	PARAMETERS pFrameGuage = `18` 
ENDIF&lt;/PRE&gt; &lt;BR /&gt;
The Check Script says everything is fine!  WTH!?!   &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_mad.gif" style="display : inline;" /&gt; &lt;BR /&gt;
 &lt;BR /&gt;
It seems that every time I write a GDL with a lot of decision-making code, some part of it is guaranteed to fail with no perceptible reason.  In the past I've had one LOCK call out of 20 not lock it's variable.  I've had random HIDEPARAMETER calls refuse hide their parameters.  It's a complete crap-shoot. &lt;BR /&gt;
 &lt;BR /&gt;
I'm about to give up doing any more smart GDLs because I easily kill an hour trying to figure out just one of these stupid little problems with no success.  Any ideas?&lt;/R&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 24 May 2023 08:32:39 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Invalid-Parameter-Name-What/m-p/46881#M33333</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-05-24T08:32:39Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid Parameter Name?  What?!?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Invalid-Parameter-Name-What/m-p/46882#M33334</link>
      <description>just an idea - try a completely new paramater. If that works abandon the old one. (better still delete the parameter and then add again)</description>
      <pubDate>Sat, 29 Jul 2006 00:56:40 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Invalid-Parameter-Name-What/m-p/46882#M33334</guid>
      <dc:creator>Aussie John</dc:creator>
      <dc:date>2006-07-29T00:56:40Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid Parameter Name?  What?!?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Invalid-Parameter-Name-What/m-p/46883#M33335</link>
      <description>Jay,&lt;BR /&gt;
&lt;BR /&gt;
try this:&lt;BR /&gt;
&lt;BR /&gt;
pFrameGuage = `` &lt;BR /&gt;
IF pFrameType = `HM` THEN &lt;BR /&gt;
   PARAMETERS pFrameGuage = `16` &lt;BR /&gt;
ELSE &lt;BR /&gt;
   PARAMETERS pFrameGuage = `18` &lt;BR /&gt;
ENDIF&lt;BR /&gt;
&lt;BR /&gt;
I have noticed that in some cases you need to pre-format the string variable to 'string'</description>
      <pubDate>Sat, 29 Jul 2006 06:04:42 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Invalid-Parameter-Name-What/m-p/46883#M33335</guid>
      <dc:creator>Rob</dc:creator>
      <dc:date>2006-07-29T06:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid Parameter Name?  What?!?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Invalid-Parameter-Name-What/m-p/46884#M33336</link>
      <description>John had the winning answer.  First I added a Test parameter and used Test in the code instead of pFrameGuage, and it worked.  So I deleted the original pFrameGuage parameter and renamed Test to pFrameGuage -- it worked.&lt;BR /&gt;
&lt;BR /&gt;
The moral of this story is...&lt;BR /&gt;
&lt;BR /&gt;
If the GDL interpreter doesn't like one of your parameters -- even though it should -- throw the parameter away and try again.  Don't question why -- it will just drive you crazy!  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_eek.gif" style="display : inline;" /&gt;</description>
      <pubDate>Sun, 30 Jul 2006 19:11:11 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Invalid-Parameter-Name-What/m-p/46884#M33336</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-07-30T19:11:11Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid Parameter Name?  What?!?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Invalid-Parameter-Name-What/m-p/46885#M33337</link>
      <description>One tangential tidbit, Jay, for you and all others learning GDL:&lt;BR /&gt;
&lt;BR /&gt;
You spelled your variable name as "pFrameGuage", but I suspect you meant "pFrameGauge"  (unless guage means something in Spanish or ...).&lt;BR /&gt;
&lt;BR /&gt;
It's really good IMHO to use meaningful variable names as you have, but a very common error happens when these names are spelled (or typed) incorrectly.  Suppose a future programmer works on your object and pronounces the name in his head correctly and spells it correctly as well?  The correctly spelled version (which does not match your name) will be an undefined variable ... which GDL interprets as having the value zero (0).  I'd suggests a 'replace all' to nip this in the bud.&lt;BR /&gt;
&lt;BR /&gt;
Of course, typos happen in scripts all the time... resulting in incorrect script execution (because the name is valid, but the value of 0 screws things up).  Somewhere on the wish list was a wish for requiring variables to be declared, as in many programming languages, so that these kinds of errors could be caught by "Check Script"...&lt;BR /&gt;
&lt;BR /&gt;
Cheers,&lt;BR /&gt;
Karl</description>
      <pubDate>Sun, 30 Jul 2006 21:41:45 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Invalid-Parameter-Name-What/m-p/46885#M33337</guid>
      <dc:creator>Karl Ottenstein</dc:creator>
      <dc:date>2006-07-30T21:41:45Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid Parameter Name?  What?!?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Invalid-Parameter-Name-What/m-p/46886#M33338</link>
      <description>&lt;BLOCKQUOTE&gt;Karl wrote:&lt;BR /&gt;You spelled your variable name as "pFrameGuage", but I suspect you meant "pFrameGauge" &lt;/BLOCKQUOTE&gt; &lt;BR /&gt;
 &lt;BR /&gt;
It looked kinda weird, but I was busy trying to keep my train of thought late on a Friday afternoon. &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_redface.gif" style="display : inline;" /&gt;  On the positive side, I was consistently wrong everywhere I used that variable.  Whenever I have a problem like this, one of the things I try first is to copy the variable name right out of the parameters list so I know it's identical.</description>
      <pubDate>Sun, 30 Jul 2006 21:48:27 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Invalid-Parameter-Name-What/m-p/46886#M33338</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-07-30T21:48:27Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid Parameter Name?  What?!?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Invalid-Parameter-Name-What/m-p/46887#M33339</link>
      <description>&lt;BLOCKQUOTE&gt;Jay wrote:&lt;BR /&gt;John had the winning answer.  First I added a Test parameter and used Test in the code instead of pFrameGuage, and it worked.  So I deleted the original pFrameGuage parameter and renamed Test to pFrameGuage -- it worked.&lt;BR /&gt;
&lt;BR /&gt;
The moral of this story is...&lt;BR /&gt;
&lt;BR /&gt;
If the GDL interpreter doesn't like one of your parameters -- even though it should -- throw the parameter away and try again.  Don't question why -- it will just drive you crazy!  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_eek.gif" style="display : inline;" /&gt;&lt;/BLOCKQUOTE&gt;
Good to hear Jay&lt;BR /&gt;
Just a tip - make sure you dont save the object while the parameter is missing and open a project as any modified parameters of that variable (in a placed object) will be lost.</description>
      <pubDate>Sun, 30 Jul 2006 22:54:29 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Invalid-Parameter-Name-What/m-p/46887#M33339</guid>
      <dc:creator>Aussie John</dc:creator>
      <dc:date>2006-07-30T22:54:29Z</dc:date>
    </item>
  </channel>
</rss>

