<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Script errors, but works?]]></title><description><![CDATA[<p dir="auto">The following script is erroring, but it's working.  So I'm not sure what's wrong.  I'm not very good at scripting, can anyone help out? Thanks!</p>
<blockquote>
<p dir="auto">if (($node-&gt;snmpSysName != null) &amp;&amp; ($node-&gt;snmpSysName != "") &amp;&amp; (($node-&gt;driver == "MIKROTIK") || ($node-&gt;driver ~= "CAMBIUM")))<br />
{<br />
   RenameObject($node, $node-&gt;snmpSysName);<br />
}</p>
</blockquote>
<p dir="auto">Here's the error:</p>
<blockquote>
<p dir="auto">Script (Hook::ConfigurationPoll) execution error: Error 14 in line 8: Function or operation argument is not an object</p>
</blockquote>
]]></description><link>https://forum.netxms.org/topic/7069/script-errors-but-works</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 07:24:01 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/7069.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 31 May 2021 21:07:11 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Script errors, but works? on Tue, 01 Jun 2021 15:09:05 GMT]]></title><description><![CDATA[<p dir="auto">Thanks, that's got it sorted out now!</p>
]]></description><link>https://forum.netxms.org/post/30080</link><guid isPermaLink="true">https://forum.netxms.org/post/30080</guid><dc:creator><![CDATA[Storm-Donovan]]></dc:creator><pubDate>Tue, 01 Jun 2021 15:09:05 GMT</pubDate></item><item><title><![CDATA[Reply to Script errors, but works? on Tue, 01 Jun 2021 14:56:05 GMT]]></title><description><![CDATA[<p dir="auto">classof($object function should have closing bracket: classof($object). Output of this function is string which is compared to "Node"</p>
]]></description><link>https://forum.netxms.org/post/30079</link><guid isPermaLink="true">https://forum.netxms.org/post/30079</guid><dc:creator><![CDATA[Filipp Sudanov]]></dc:creator><pubDate>Tue, 01 Jun 2021 14:56:05 GMT</pubDate></item><item><title><![CDATA[Reply to Script errors, but works? on Tue, 01 Jun 2021 14:52:54 GMT]]></title><description><![CDATA[<p dir="auto">Line 8 is the first line, here's the script currently after the other changes suggested above.</p>
<blockquote>
<p dir="auto">/* Available global variables:<br />
 *  $object - current object, one of 'NetObj' subclasses<br />
 *  $node - current object if it is 'Node' class<br />
 *<br />
 * Expected return value:<br />
 *  none - returned value is ignored<br />
 */<br />
if (classof($object =="Node") &amp;&amp; (($node-&gt;snmpSysName != null) &amp;&amp; ($node-&gt;snmpSysName != "")) &amp;&amp; (($node-&gt;driver == "MIKROTIK") || ($node-&gt;driver ~= "CAMBIUM")))<br />
{<br />
   RenameObject($node, $node-&gt;snmpSysName);<br />
}</p>
</blockquote>
]]></description><link>https://forum.netxms.org/post/30077</link><guid isPermaLink="true">https://forum.netxms.org/post/30077</guid><dc:creator><![CDATA[Storm-Donovan]]></dc:creator><pubDate>Tue, 01 Jun 2021 14:52:54 GMT</pubDate></item><item><title><![CDATA[Reply to Script errors, but works? on Tue, 01 Jun 2021 14:35:05 GMT]]></title><description><![CDATA[<p dir="auto">Can you show the full script. Original error message says the error is in line 8, but it's not clear what line is it.</p>
]]></description><link>https://forum.netxms.org/post/30074</link><guid isPermaLink="true">https://forum.netxms.org/post/30074</guid><dc:creator><![CDATA[Filipp Sudanov]]></dc:creator><pubDate>Tue, 01 Jun 2021 14:35:05 GMT</pubDate></item><item><title><![CDATA[Reply to Script errors, but works? on Tue, 01 Jun 2021 13:24:29 GMT]]></title><description><![CDATA[<p dir="auto">I just confirmed that script doesnt work anymore.  It worked 4 weeks ago when I first set it up, but it's not working now.</p>
]]></description><link>https://forum.netxms.org/post/30073</link><guid isPermaLink="true">https://forum.netxms.org/post/30073</guid><dc:creator><![CDATA[Storm-Donovan]]></dc:creator><pubDate>Tue, 01 Jun 2021 13:24:29 GMT</pubDate></item><item><title><![CDATA[Reply to Script errors, but works? on Tue, 01 Jun 2021 13:11:59 GMT]]></title><description><![CDATA[<p dir="auto">The NetXMS server node reports the alarm, but I think it's erroring on every device.  I'm at 2400 alarms since my last message.</p>
]]></description><link>https://forum.netxms.org/post/30072</link><guid isPermaLink="true">https://forum.netxms.org/post/30072</guid><dc:creator><![CDATA[Storm-Donovan]]></dc:creator><pubDate>Tue, 01 Jun 2021 13:11:59 GMT</pubDate></item><item><title><![CDATA[Reply to Script errors, but works? on Tue, 01 Jun 2021 12:00:29 GMT]]></title><description><![CDATA[<p dir="auto">Thanks, but that didn't fix it.  It's erroring on the NetXMS server node.</p>
]]></description><link>https://forum.netxms.org/post/30071</link><guid isPermaLink="true">https://forum.netxms.org/post/30071</guid><dc:creator><![CDATA[Storm-Donovan]]></dc:creator><pubDate>Tue, 01 Jun 2021 12:00:29 GMT</pubDate></item><item><title><![CDATA[Reply to Script errors, but works? on Tue, 01 Jun 2021 00:28:14 GMT]]></title><description><![CDATA[<p dir="auto">Check this thread:</p>
<p dir="auto"><a href="/topic/7054">https://www.netxms.org/forum/general-support/script-execution-error/</a></p>
]]></description><link>https://forum.netxms.org/post/30069</link><guid isPermaLink="true">https://forum.netxms.org/post/30069</guid><dc:creator><![CDATA[Zebble]]></dc:creator><pubDate>Tue, 01 Jun 2021 00:28:14 GMT</pubDate></item><item><title><![CDATA[Reply to Script errors, but works? on Mon, 31 May 2021 21:20:18 GMT]]></title><description><![CDATA[<p dir="auto">No, it's still erroring.  It only errors on the netxms server node.</p>
]]></description><link>https://forum.netxms.org/post/30068</link><guid isPermaLink="true">https://forum.netxms.org/post/30068</guid><dc:creator><![CDATA[Storm-Donovan]]></dc:creator><pubDate>Mon, 31 May 2021 21:20:18 GMT</pubDate></item><item><title><![CDATA[Reply to Script errors, but works? on Mon, 31 May 2021 21:14:59 GMT]]></title><description><![CDATA[<p dir="auto">Never mind, I figured it out.  It was erroring on a device that was misconfigured to not poll SNMP.</p>
]]></description><link>https://forum.netxms.org/post/30067</link><guid isPermaLink="true">https://forum.netxms.org/post/30067</guid><dc:creator><![CDATA[Storm-Donovan]]></dc:creator><pubDate>Mon, 31 May 2021 21:14:59 GMT</pubDate></item></channel></rss>