1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixed @Lua does not behave as documented

Discussion in 'Support' started by djspits, Oct 6, 2016.

  1. djspits

    Joined:
    Apr 13, 2010
    Messages:
    189
    Likes Received:
    2
    Code:
    C:\Test :-) >echo %@lua[print "foo"]
    foo
    print "foo"
    Regards, DJ.
     
  2. mikea

    Joined:
    Dec 7, 2009
    Messages:
    211
    Likes Received:
    2
    Seen here as well. But wait! There's more!

    c:\takecommand20> echo %@perl[print "foo"]
    Error (SYS): Invalid class string
    -1
     
  3. JohnQSmith

    Joined:
    Jan 19, 2011
    Messages:
    559
    Likes Received:
    7
    @mikea Check to make sure you have PerlScript installed as per the documentation. I don't have it installed and got the same error.
     
  4. mikea

    Joined:
    Dec 7, 2009
    Messages:
    211
    Likes Received:
    2
    Ah, so this relies on PerlScript, eh? I have never installed it. I'd always thought this kind of problem with Perl pertained to some weirdness with ActiveState's Perl (which is the only version I've used).
     
  5. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,869
    Likes Received:
    83
  6. JohnQSmith

    Joined:
    Jan 19, 2011
    Messages:
    559
    Likes Received:
    7
    Now I get this
    Code:
    [C:\BIN\JPSoft\TCMD20] 11:04:16 $ echo %@lua[print 'foo']
    foo
    ECHO is OFF
    
    [C:\BIN\JPSoft\TCMD20] 11:04:27 $ %@lua[print 'foo']
    foo
    
     
  7. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,869
    Likes Received:
    83
    Echoing the result of @LUA is kind of pointless, as it will always return 0 unless there's an internal Lua error, in which case you'll get an error message and the ECHO will never be executed.
     
  8. JohnQSmith

    Joined:
    Jan 19, 2011
    Messages:
    559
    Likes Received:
    7
    I didn't write the example in the user's guide...
     
  9. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,970
    Likes Received:
    30
    That doesn't agree with what JQS observed. Why wasn't "0" echoed in his first example? And I would have expected
    Code:
    TCC: Unknown command "0"
    from his second example.
     

Share This Page