lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

I'm using embedded lua scripts in my engine (the engine is written in c++). I'd like to use the luaSDL module to get SDL work with my scripts.

So I have figured out that this is done by loadlib() (All the lua5 module examples in the used loadlib, and there's no loadmodule() available for lua 5.0).

But when my script does this:

loadlib("./", "tolua_SDL_open")()

my program says

'attempt to index a function value'

and exits.

What is the problem, what did I do wrong? Should I quit programming?

I think tolua_SDL_open() is the only function which initializes the module/library.

Add photos to your messages with MSN 8. Get 2 months FREE*.