<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Yes, Bruce, that is definitely the same bug.<br>
Now I've already been fixing for six hours ... that's really a very
annoying behaviour ...<br>
but hopefully 5.3 will bring some new features. Maybe even a
debugging feature ?<br>
<br>
<div class="moz-cite-prefix">Am 10.11.2015 um 17:03 schrieb Bruce
Olson:<br>
</div>
<blockquote
cite="mid:007b01d11bd1$68847100$398d5300$@web.yosound.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="Generator" content="Microsoft Word 14 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Helvetica;
panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
{font-family:Helvetica;
panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
color:black;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";
color:black;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";
color:black;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;
color:black;}
span.EmailStyle19
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.EmailStyle20
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle21
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";
color:black;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Jan,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Thanks for
tracking down the documentation. I found the same error on
Sunday, see the <b>PageFormatPrefs.SystemStaffHeight error:
bad argument #2 to '?' (number has no integer
representation)</b> message I sent on Sunday last.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"
style="background:white;text-autospace:none"><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">-- <o:p></o:p></span></p>
<p class="MsoNormal"
style="background:white;text-autospace:none"><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Regards,<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Bruce</span><span
style="font-size:13.0pt;font-family:"Tahoma","sans-serif""><o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF
1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">From:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">
JWLua [<a class="moz-txt-link-freetext" href="mailto:jwlua-bounces@jwmusic.nu">mailto:jwlua-bounces@jwmusic.nu</a>] <b>On Behalf Of
</b>Charles O. Lawrence<br>
<b>Sent:</b> Tuesday, November 10, 2015 8:16 AM<br>
<b>To:</b> 'The JW Lua script plug-in.'<br>
<b>Subject:</b> Re: [JW Lua] Automatic float to integer
conversion ... Lua 5.3 ?!<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">Jan,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Interesting
info. I think you hit on the answer to the strange errors.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Charles<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1
1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="color:windowtext">From:</span></b><span
style="color:windowtext"> JWLua [<a
moz-do-not-send="true"
href="mailto:jwlua-bounces@jwmusic.nu"><a class="moz-txt-link-freetext" href="mailto:jwlua-bounces@jwmusic.nu">mailto:jwlua-bounces@jwmusic.nu</a></a>]
<b>On Behalf Of </b>Jan Angermüller<br>
<b>Sent:</b> Tuesday, November 10, 2015 8:11 AM<br>
<b>To:</b> The JW Lua script plug-in. <<a
moz-do-not-send="true" href="mailto:jwlua@jwmusic.nu"><a class="moz-txt-link-abbreviated" href="mailto:jwlua@jwmusic.nu">jwlua@jwmusic.nu</a></a>><br>
<b>Subject:</b> Re: [JW Lua] Automatic float to integer
conversion ... Lua 5.3 ?!<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">Probably this
is due to a change in Lua 5.3:<br>
the chapter on integer/float conversion is new ( <a
moz-do-not-send="true"
href="http://www.lua.org/manual/5.3/manual.html#3.4.3"><a class="moz-txt-link-freetext" href="http://www.lua.org/manual/5.3/manual.html#3.4.3">http://www.lua.org/manual/5.3/manual.html#3.4.3</a></a>
) and didn't exist for Lua 5.2.<br>
It states: <br>
<span
style="font-size:13.5pt;font-family:"Helvetica","sans-serif";background:white">"The
conversion from float to integer checks whether the float
has an <b>exact </b>representation as an integer (that is,
the float has an integral value and it is in the range of
integer representation). If it does, that representation is
the result. Otherwise, the conversion <b>fails</b>."<br>
<br>
Lesson learned: <br>
<b>Don't assign float types to properties that expect
integers in Lua 5.3.</b> <b><br>
They will not be automatically converted to integers
anymore.</b><br>
<br>
This document gives a good overview of the new integer/float
handling in Lua 5.3:<br>
<a moz-do-not-send="true"
href="http://www.lua.org/wshop14/Ierusalimschy.pdf">http://www.lua.org/wshop14/Ierusalimschy.pdf</a><br>
<br>
</span>So it seems that I will have a lot of fails now...<br>
Bad luck then ... at least it leads to a cleaner code in the
end.<br>
<br>
Jan<span style="font-size:12.0pt"><o:p></o:p></span></p>
<div>
<p class="MsoNormal">Am 10.11.2015 um 11:08 schrieb Jan
Angermüller:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal" style="margin-bottom:12.0pt">Jari,<br>
<br>
I am trying to make my scripts compatible with v.40/v.42 and
get lots of bad argument errors as Charles described some
days ago ("Strange Error Message"-thread), although with
different descriptions, for example:<br>
bad argument #2 to '?' (number has no integer
representation)<br>
And in my case<b> these errors have not occured when running
the scripts in previous versions of JW Lua.</b><br>
<br>
For example:<br>
(a is an FCArticulationDef)<br>
a.MainHandleVerticalOffset=a.MainHandleVerticalOffset+vertoffset
<br>
It used to work fine for any vertoffset value, even with
vertoffset being a float type.<br>
Now it throws the error message above WITHOUT the code line
and requires an explicit integer conversion to work:<br>
a.MainHandleVerticalOffset=a.MainHandleVerticalOffset+math.floor(vertoffset)<br>
<br>
Although the error message is technically correct (a float
is not an integer), the automatic type conversion used to
work fine.<br>
That will be probably be days of work to fix in more than
30.000 lines of code if you have to track down every error
without a debugger.<br>
<br>
What's the reason for the new error message ? Is it a
stricter parser or Lua 5.3 or anything else ?<br>
Do you see any chance of solving that without having to
rewrite all the code.<br>
Or at least add the code line when a "Bad Argument" error is
thrown ? <br>
<br>
All the best,<br>
Jan<o:p></o:p></p>
<div>
<p class="MsoNormal">Am 28.10.2015 um 22:40 schrieb Charles
O. Lawrence:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">Jari,<o:p></o:p></p>
<p class="MsoNormal">Sometimes when running a script I get
an error message like this. There is no line number nor
is there a red marker at any source line. It makes
locating the problem rather difficult in a large script.
Any ideas? Beta 0.42<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">bad argument #2 to '?' (number
expected, got boolean)<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Thanks,Charles<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Sorry, I left off the subject<o:p></o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span
style="font-size:12.0pt;font-family:"Times New
Roman","serif""><br>
<br>
<o:p></o:p></span></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>JWLua mailing list<o:p></o:p></pre>
<pre><a moz-do-not-send="true" href="mailto:JWLua@jwmusic.nu">JWLua@jwmusic.nu</a><o:p></o:p></pre>
<pre><a moz-do-not-send="true" href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu">http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu</a><o:p></o:p></pre>
</blockquote>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span
style="font-size:12.0pt;font-family:"Times New
Roman","serif""><br>
<br>
<br>
<o:p></o:p></span></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>JWLua mailing list<o:p></o:p></pre>
<pre><a moz-do-not-send="true" href="mailto:JWLua@jwmusic.nu">JWLua@jwmusic.nu</a><o:p></o:p></pre>
<pre><a moz-do-not-send="true" href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu">http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu</a><o:p></o:p></pre>
</blockquote>
<p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Times New
Roman","serif""><o:p> </o:p></span></p>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
JWLua mailing list
<a class="moz-txt-link-abbreviated" href="mailto:JWLua@jwmusic.nu">JWLua@jwmusic.nu</a>
<a class="moz-txt-link-freetext" href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu">http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu</a>
</pre>
</blockquote>
<br>
</body>
</html>