Page 1 of 1

Error Loading Script

Posted: 26 Jan 2014 23:32
by Carmel88
I am having an error with making a lua extension. The error is reproducible with the following below. What is happening?

Log entry:
lua warning: Error loading script c:\uniquevlcpath\vlc\lua\extensions\test.lua: c:\uniquevlcpath\vlc\lua\extensions\test.lua:1: attempt to index global 'vlc' (a nil value)

test.lua contains a single line:
vlc.msg.dbg("Welcome")

Re: Error Loading Script

Posted: 27 Jan 2014 19:59
by mederi
Because it is not valid VLC Extension. You have to use mandatory functions (descriptor(), activate(), ...) and put your custom stuff in there or call your custom functions.

Re: Error Loading Script

Posted: 27 Jan 2014 20:52
by Carmel88
Hi mederi!

Yes, I have been reading your posts for hours:

Pause @ start is a good example of a barebones extension

Unfortunately, with the way I am trying to approach getting the current elapsed time from VLC extensions and intf seem to have ZERO options that work I guess it just looks too much like (takes deep exasperated breath) POLLING.

Thanks

Re: Error Loading Script

Posted: 27 Jan 2014 21:04
by mederi
Extensions based on vlc.var.add_callback() work in VLC-2.0.x, but not in new VLC-2.1.x.

Re: Error Loading Script

Posted: 27 Jan 2014 22:26
by Carmel88
Even if callbacks kind of smell like POLLING :)

This is BEAUTIFUL! VLC 2.0.8 to the rescue!!! This is much^3 faster response time than rc get_time...too bad I couldn't quite figure out how to connect like SyncPlay.

Thanks again to mederi & to Etoh