Celestia 1.5.1 and sockets?

General discussion about Celestia that doesn't fit into other forums.
Topic author
Stuffer
Posts: 67
Joined: 03.12.2008
With us: 15 years 11 months
Location: Stuttgart, Germany

Celestia 1.5.1 and sockets?

Post #1by Stuffer » 21.05.2009, 14:44

Hi!

Does Celestia 1.5.1 work with sockets somehow?

I tried the same approach as I did with Cel 1.6 where I simply copied the folders "lua", "mime" and "socket" into the Celestia root folder.
But with a celx script there's always the error "attempt to call global 'require' (a nil value)"

the script is

Code: Select all

require "socket"

local socket = socket.tcp()
...


Is there sth. else that has to be done to be able to use the socket library in Cel 1.5.1?
I use the socket lib 2....
I also tried copying the lua folder into the extras folder. Didn't work either.
I want to provide an add-on but it works only for Cel 1.6 yet.

Thanks for every hint on this
--Stuffer
Win XP Pro x Core2Duo 2,1GHz x 2 GB RAM x NVidia Quadro FX 1500 256 MB

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Re: Celestia 1.5.1 and sockets?

Post #2by chris » 21.05.2009, 15:13

Stuffer wrote:Hi!

Does Celestia 1.5.1 work with sockets somehow?

I tried the same approach as I did with Cel 1.6 where I simply copied the folders "lua", "mime" and "socket" into the Celestia root folder.
But with a celx script there's always the error "attempt to call global 'require' (a nil value)"

The problem is that in Celestia 1.5.1 'require' was only permitted in hook scripts by default. But, if you change ScriptSystemAccessPolicy to 'Allow', it should work in 1.5.1 as well

--Chris

Topic author
Stuffer
Posts: 67
Joined: 03.12.2008
With us: 15 years 11 months
Location: Stuttgart, Germany

Re: Celestia 1.5.1 and sockets?

Post #3by Stuffer » 21.05.2009, 15:21

Thanks Chris,

hm, actually I already changed systemaccesspolicy.

But I can try the hook script. If it works there it would be sufficient for my purposes.

Stuffer

EDIT: seems to work. Thanks Chris
Win XP Pro x Core2Duo 2,1GHz x 2 GB RAM x NVidia Quadro FX 1500 256 MB


Return to “Celestia Users”