[JW Lua] Strange error message

Charles O. Lawrence charlesolawrence at bellsouth.net
Fri Oct 30 14:48:19 CET 2015


As it turned out in this particular case, I was mistakenly trying to assign
a boolean value to a class object property that was supposed to be an
integer.  The error message was completely baffling since there was no
arguments involved, only an assignment.  It must be an "internal to the PDK"
run time error that is being raised, since Lua is not a typed language
whereas C++ (PDK) is.  Does that make sense?  Also, there was no red "spot"
flagged on the JW Lua source, nor a line number given.  I was able to find
the offending assignment since the error began occurring after I had added a
few more lines of Lua code, so I knew where to look.  If it used to work and
it doesn't anymore, then something you just did must have caused the error.
Old programmers adage!

Charles

-----Original Message-----
From: JWLua [mailto:jwlua-bounces at jwmusic.nu] On Behalf Of Jari Williamsson
Sent: Friday, October 30, 2015 7:31 AM
To: The JW Lua script plug-in. <jwlua at jwmusic.nu>
Subject: Re: [JW Lua] Strange error message

Charles,

My guess would be that it's one of the JW Lua iterators (each, eachentry,
eachentrysaved, etc) that's reports it, even though I can't create a
scenario that reproduces it.


Best regards,

Jari Williamsson

On 2015-10-28 22:40, Charles O. Lawrence wrote:
> Jari,
>
> 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
>
> bad argument #2 to '?' (number expected, got boolean)
>
> Thanks,Charles
>
> Sorry, I left off the subject
>
>
>
> _______________________________________________
> JWLua mailing list
> JWLua at jwmusic.nu
> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
>



_______________________________________________
JWLua mailing list
JWLua at jwmusic.nu
http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu





More information about the JWLua mailing list