Using the sub.required = {}

Asked by Pirre

I am trying to get the "connect" lua set working under the bridge but whenever this sub.required = {} function is called i get the following error

Logging: 2010-05-02 10:42:25: LuaScript: Error loading file: ptokax.lua:765: Error loading string

I used the /samples/cddb.lua script deliverd with this package to make sure that it was called correct but error is the same.

All my dll's and lua's are in place (i think lol) can you have a look if it's me or a bug ?

Question information

Language:
English Edit question
Status:
Solved
For:
ADCH++-PtokaX Edit question
Assignee:
No assignee Edit question
Solved by:
Pirre
Solved:
Last query:
Last reply:
Revision history for this message
poy (poy) said :
#1

where did you find that script? i don't distribute any script package... and can't find any script related to cddb on the PtokaX site.

Revision history for this message
Pirre (pierreparys) said :
#2

Its a sample script that comes with the connect suite ( http://www.czdc.org/PtokaX/Libs-0.4.0.0RC6/PXLuaSocket-2.0.2.7z) and is used by Px scripts like Shoutcast :)

Revision history for this message
poy (poy) said :
#3

i have improved the require function, it should support loading DLLs, however the px-specific DLLs aren't yet supported.

Revision history for this message
Pirre (pierreparys) said :
#4

We seem to be one step futher, but loading dll's is not working , i used the plain lua version of the socket and still problem when loading it's dll :)

luasocket-2.0.2-lua-5.1.2-Win32-vc8.zip errors when calling socket.dll

Revision history for this message
poy (poy) said :
#5

rev 26: i have improved loading a bit more; tried with that particular luasocket package (just extracted its contents in the binary folder, next to adchppd.exe etc) and it seems to be loading correctly; haven't tested any script that makes use ot if though.

Revision history for this message
poy (poy) said :
#6

the ShoutCast script depends on a particular file (ssmodc) that the dev has compiled but i don't have the source for, and it is failing to load. would be interesting to test a script that depends only on pxluasocket, but make it use the standard luasocket instead. if that works out, i will just redirect any include of pxluasocket to include vanilla luasocket.

Revision history for this message
Pirre (pierreparys) said :
#7

Ye tripped over that also :) and trying what you sugested

so am now using portchecker.lua

A very simple px script that also calls the socket, have the native lua socket in place and it seems it passes calling socket.http but when that declares that it need the socket.url (atleast thats asfare i can follow) i get the following error

LuaScript: Error loading file: adchpp-ptokax.lua:970: Error loading the module "socket_url" via "require"

seems a bit strange that underscore in the require

Revision history for this message
Pirre (pierreparys) said :
#8

Rev 27 solved the socket problem , the shoutcast.lua works now using the standard lua socket :)