Error Loading Script

Discuss your Lua playlist, album art and interface scripts.
Carmel88
New Cone
New Cone
Posts: 9
Joined: 25 Jan 2014 23:55

Error Loading Script

Postby Carmel88 » 26 Jan 2014 23:32

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")

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: Error Loading Script

Postby mederi » 27 Jan 2014 19:59

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.

Carmel88
New Cone
New Cone
Posts: 9
Joined: 25 Jan 2014 23:55

Re: Error Loading Script

Postby Carmel88 » 27 Jan 2014 20:52

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

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: Error Loading Script

Postby mederi » 27 Jan 2014 21:04

Extensions based on vlc.var.add_callback() work in VLC-2.0.x, but not in new VLC-2.1.x.

Carmel88
New Cone
New Cone
Posts: 9
Joined: 25 Jan 2014 23:55

Re: Error Loading Script

Postby Carmel88 » 27 Jan 2014 22:26

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


Return to “Scripting VLC in lua”

Who is online

Users browsing this forum: No registered users and 2 guests