<?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: bad argument type: stringp nil in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-bad-argument-type-stringp-nil/m-p/9765729#M70005</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;STRINGP is the feedback of an internal predicate function.&lt;/P&gt;
&lt;P&gt;For example: SUBSTR need a STRING as first argument,&lt;/P&gt;
&lt;P&gt;stringp checks the first argument for "Is it a string?" string predicate / STRINGP&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Error STRINGP means: Need a string, but it wasn't a string.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Where is the problem? Your old RegKeys doesn't match&amp;nbsp; the RegKeys of your current windows version.&lt;/P&gt;
&lt;P&gt;&lt;U&gt;You have to find where the information is stored in this windows version.&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(defun codblocare# ()&lt;BR /&gt;(setq &lt;FONT color="#0000FF"&gt;keya1&lt;/FONT&gt; ( vl-registry-read "HKEY_local_machine\\SOFTWARE\\microsoft\\WINDOWS\\currentversion" "productkey"))&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;keya1 is NIL, because there is no vl-registry-read "HKEY_local_machine\\SOFTWARE\\microsoft\\WINDOWS\\currentversion(\\productkey)&lt;/STRONG&gt;&lt;FONT color="#FF0000"&gt;, right?&lt;/FONT&gt;&lt;BR /&gt;...&lt;BR /&gt;(setq ccd1 (substr &lt;FONT color="#0000FF"&gt;keya1&lt;/FONT&gt; 2 1 ))&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;SUBSTR want a String, but keya1 is nil (and nil is nothing), the error: bad argument type: stringp nil appears&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 24 Sep 2020 12:33:44 GMT</pubDate>
    <dc:creator>cadffm</dc:creator>
    <dc:date>2020-09-24T12:33:44Z</dc:date>
    <item>
      <title>error: bad argument type: stringp nil</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-bad-argument-type-stringp-nil/m-p/9765642#M70004</link>
      <description>&lt;PRE&gt;&lt;SPAN&gt;Hello
I really need help, I wrote this lisp 18 years ago, I try to make it work on windows 10 and autocad 2019, I have an error on the command "regenkey" and "mobicadcod", if you can help me, thank you in advance. Atached you have the lsp file.&lt;/SPAN&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 24 Sep 2020 11:56:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-bad-argument-type-stringp-nil/m-p/9765642#M70004</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-09-24T11:56:39Z</dc:date>
    </item>
    <item>
      <title>Re: error: bad argument type: stringp nil</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-bad-argument-type-stringp-nil/m-p/9765729#M70005</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;STRINGP is the feedback of an internal predicate function.&lt;/P&gt;
&lt;P&gt;For example: SUBSTR need a STRING as first argument,&lt;/P&gt;
&lt;P&gt;stringp checks the first argument for "Is it a string?" string predicate / STRINGP&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Error STRINGP means: Need a string, but it wasn't a string.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Where is the problem? Your old RegKeys doesn't match&amp;nbsp; the RegKeys of your current windows version.&lt;/P&gt;
&lt;P&gt;&lt;U&gt;You have to find where the information is stored in this windows version.&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(defun codblocare# ()&lt;BR /&gt;(setq &lt;FONT color="#0000FF"&gt;keya1&lt;/FONT&gt; ( vl-registry-read "HKEY_local_machine\\SOFTWARE\\microsoft\\WINDOWS\\currentversion" "productkey"))&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;keya1 is NIL, because there is no vl-registry-read "HKEY_local_machine\\SOFTWARE\\microsoft\\WINDOWS\\currentversion(\\productkey)&lt;/STRONG&gt;&lt;FONT color="#FF0000"&gt;, right?&lt;/FONT&gt;&lt;BR /&gt;...&lt;BR /&gt;(setq ccd1 (substr &lt;FONT color="#0000FF"&gt;keya1&lt;/FONT&gt; 2 1 ))&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;SUBSTR want a String, but keya1 is nil (and nil is nothing), the error: bad argument type: stringp nil appears&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Sep 2020 12:33:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-bad-argument-type-stringp-nil/m-p/9765729#M70005</guid>
      <dc:creator>cadffm</dc:creator>
      <dc:date>2020-09-24T12:33:44Z</dc:date>
    </item>
    <item>
      <title>Re: error: bad argument type: stringp nil</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-bad-argument-type-stringp-nil/m-p/9766055#M70006</link>
      <description>&lt;PRE&gt;&lt;SPAN&gt;thanks for the reply, that's right, I managed to solve it&lt;/SPAN&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 24 Sep 2020 14:24:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-bad-argument-type-stringp-nil/m-p/9766055#M70006</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-09-24T14:24:44Z</dc:date>
    </item>
  </channel>
</rss>

