[JW Lua] Stopping a script

Charles O. Lawrence charlesolawrence at bellsouth.net
Wed Sep 10 16:27:39 CEST 2014


Jari,

Thanks.  I had tried just "return" before I asked the question but it didn't
work.  If knew you could stop execution like the examples given in the UI.
I suppose something like 

If true then return end

would also work.  It seemed like overkill, but I guess that's just the way
Lua works.

Charles







-----Original Message-----
From: JWLua [mailto:jwlua-bounces at jwmusic.nu] On Behalf Of Jari Williamsson
Sent: Wednesday, September 10, 2014 10:14 AM
To: The JW Lua script plug-in.
Subject: Re: [JW Lua] Stopping a script

Charles,

I spoke too soon. "return" can't be used outside a block, so to stop the
script with a line of code use "do return end".


Best regards,

Jari Williamsson


On 2014-09-10 15:54, Jari Williamsson wrote:
> On 2014-09-10 15:49, Charles O. Lawrence wrote:
>
>> While debugging a script, I want to stop the script after going so far.
>> What is the best way to stop a script (Lua command)?  The script is
>> not in a
>> loop, just executing commands in-line.
>
> return
>
> You can also use a return value from the script, which will (if it's a
> number) be shown in the console.
>
>
> Best regards,
>
> Jari Williamsson
>
>
> _______________________________________________
> 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