<div dir="ltr">It searches for a line starting with "function plugindef()" and then scans until the next end statement that starts a line. If there is a plugindef function inside a multiline comment, that might do it. As far as I can tell, this is the behavior of JW Lua as well, though I might have missed something. For example, my code takes the first plugindef function it finds, whereas JW Lua might take the last.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Mar 18, 2023 at 1:34 PM Jan Angermüller <<a href="mailto:jan@angermueller.com">jan@angermueller.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
Could it be that there is some letter / letter combination that
stops the search for plugindef? Maybe on Windows only?<br>
<br>
When I only put a simple <i>if ... then end</i> before
plugindef(), it still works fine.<br>
But in Perfect Layout the plugindef was somewhere on line 400 or so
and that was not detected.<br>
<br>
Jan<br>
<br>
<div>Am 18.03.2023 um 19:23 schrieb Robert
Patterson:<br>
</div>
<blockquote type="cite">
<div dir="ltr">The location of the plugindef function is not
supposed to matter. Let me see if I can reproduce that here.<br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Sat, Mar 18, 2023 at
8:42 AM Jan Angermüller <<a href="mailto:jan@angermueller.com" target="_blank">jan@angermueller.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div> Robert,<br>
<br>
thanks for your quick response!<br>
<br>
<blockquote type="cite">
<div dir="ltr">
<ul>
<li> Is it possible you requested the embedded version
in the wrong `plugindef` function? <br>
</li>
</ul>
</div>
</blockquote>
Solved it! <br>
The problem had indeed to do with the plugindef function. <br>
<br>
The plugindef function was only recognized correctly by RGP
Lua when it was at the very top of the plug-in code.<br>
<br>
Usually the plugindef is not at the top of the (uncompiled)
version of Perfect Layout. <br>
But when I moved it to the very first line of the code, it
worked.<br>
Is this the expected behaviour in RGP Lua?<br>
<br>
As the compiled version of Perfect Layout works different
(with a second file that requires the main plug-in code), it
is probably different there. <br>
But I haven't checked a compiled Perfect Layout version with
5.4 yet. I assume it will work though.<br>
<br>
<br>
<br>
<blockquote type="cite">
<div dir="ltr">
<ul>
<li>That's weird about ZeroBraneStudio. I've been
using it interchangeably between 5.2 and 5.4 without
issues. Maybe mine was a newer installation. <br>
</li>
</ul>
</div>
</blockquote>
Could be that your installation was newer. I didn't
reinstall ZeroBraneStudio.<br>
<br>
<blockquote type="cite">
<div dir="ltr">
<ul>
<li>Should I investigate the `tonumber` issue? </li>
</ul>
</div>
</blockquote>
Any other opinions? <br>
I rarely use it and it was only one line in the code that
had the problem.<br>
<br>
I'll run more tests with my test suite later.<br>
<br>
Jan<br>
</div>
_______________________________________________<br>
JWLua mailing list<br>
<a href="mailto:JWLua@jwmusic.nu" target="_blank">JWLua@jwmusic.nu</a><br>
<a href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu" rel="noreferrer" target="_blank">http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu</a><br>
</blockquote>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
JWLua mailing list
<a href="mailto:JWLua@jwmusic.nu" target="_blank">JWLua@jwmusic.nu</a>
<a href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu" target="_blank">http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu</a>
</pre>
</blockquote>
<br>
<pre cols="72">--
Jan Angermüller
Orchideenstieg 13
22297 Hamburg
Tel. 040 - 28 94 84 82
Mobil 0173 - 99 33 904
<a href="http://www.elbsound.studio" target="_blank">www.elbsound.studio</a></pre>
</div>
_______________________________________________<br>
JWLua mailing list<br>
<a href="mailto:JWLua@jwmusic.nu" target="_blank">JWLua@jwmusic.nu</a><br>
<a href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu" rel="noreferrer" target="_blank">http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu</a><br>
</blockquote></div>