ETMods.net

N!tmod, a Wolfenstein: Enemy Territory Modification!

You are not logged in.

Announcement

You can donate to help us keeping services online.

#1 07-Mar-14 00:13:08

NoHero
Member
Registered: 07-Dec-13
Posts: 19

lua and sqlite

Since the lua script im working on needs a storage system, to keep track of stats etc.. I turned to use SQLite but i am unable to load the .dll needed. I keep getting the error:

Lua API: Loading /luascripts/statwhore.lua
Lua API: G_LuaStartVM error running lua script: error loading module 'lsqlite3' from file '..\<directory>\..\nitmod\lualibs\lsqlite3.dll':
	The specified module could not be found.

At first i was getting some different errors before i moved the lsqlite3.dll into the \lualib directory. I am assuming i can load libraries to be used, is this wrong? Might there be something wrong with the dll?

Has anyone got SQLite working before and have some tips? Im trying to avoid bringing too many libs in, but i also dont want to write a parser to read/write to a txt file.

Offline

#2 07-Mar-14 13:56:42

Micha
Member
From: Germany
Registered: 11-Feb-13
Posts: 38
Website

Re: lua and sqlite

Sol already made such a lua. You can find it here: http://mygamingtalk.com/forums/files/fi … ts-logger/
Maybe you can use his solution.

Offline

#3 07-Mar-14 14:16:37

NoHero
Member
Registered: 07-Dec-13
Posts: 19

Re: lua and sqlite

He is using MySQL, it has a lot more features but also a lot heavier than i want. Plus still doesn't show how he made the library available, which is were im getting stuck.

EDIT: is it possible to use another LUA installation instead of the one which comes with nitmod?
EDIT2: Im at a real loss now, i tried different libraries to no avail ones which i know work with the standalone lua 5.1 Even when i checked the dll dependencies with ldd there were none that weren't met. I guess ill have to write a basic parser for my script and dump into a txt file.

Last edited by NoHero (08-Mar-14 01:30:45)

Offline

#4 08-Mar-14 13:58:14

ailmanki
BETA Tester
Registered: 08-Jun-12
Posts: 42
Website

Re: lua and sqlite

The error msg says it can't find the module..

Try debug it.

print(package.path)
(http://lua-users.org/wiki/PackagePath)
then put the dll inside the path you get.


b_350_20_692108_381007_FFFFFF_000000.pngb_350_20_692108_381007_FFFFFF_000000.png

Offline

Board footer

Powered by FluxBB