PtokaX forum

Development Section => LUA & PtokaX-Scripting-Interface => Topic started by: bluebear on 12 October, 2005, 14:07:04

Title: Lua Extension: SQLite3 for PtokaX >= 0.3.3.21
Post by: bluebear on 12 October, 2005, 14:07:04
Hey peeps.

Since lua was compiled as a external dll in ptokax.
Many has tryed to build lsqlite for the ptokax lua interface. So far as I know all those attempts failed.

Therefore I have compiled a version of LuaSQLite3.
It's called PxSQLite3 Build 1. I have only tested the lib with the test.lua from the original package.

PxSQLite3b1 is a mod of LuaSQLite3.
Mods were made to make it work with PXLua.dll
and you use it the same way as the original version.

The test.lua provided with PxSQLite3 is also modded a bit. But only in the first few lines.

I would be glad if some of the lua scripters out there would download and test it.

PxSQLite3 is distributed in 2 archives (source and bins).

Download PxSQLite3b1 here: http://www.thewildplace.dk/lua/pxsqlite3/ (http://www.thewildplace.dk/lua/pxsqlite3/)

If you wanna know more about sqlite visit http://www.sqlite.org (http://www.sqlite.org)

Enjoy,
bluebear
Title:
Post by: (-=TrIp-iN-SuN=-) on 12 October, 2005, 16:40:34
and when i add this file in ptokax folder or script folder?
and what it's file doing to me?
Title:
Post by: GeceBekcisi on 12 October, 2005, 17:59:16
QuoteOriginally posted by (-=TrIp-iN-SuN=-)
and when i add this file in ptokax folder or script folder?
and what it's file doing to me?
You'll be able to use and write scripts which will need SQLite database with this library. You don't need to download it and put it inside PtokaX folder.

Cheers
Title:
Post by: bastya_elvtars on 12 October, 2005, 18:02:53
In general, you can access the databases of an SQLite server and store information in them.
Title:
Post by: plop on 13 October, 2005, 00:36:19
great job bluebear, so far no huge errors (except from my side).
sometimes the virtual machine doesn't wanna launch but need some more testing on this.
i managed 2 build a db, insert and select data from it.

@bastya: the dll is actualy the server.
every database is a file which you open from the script the moment you need it.
thats why sqlite has no configuration @ all.

@every1: place the libs in a folder called "libs" inside the scripts folder.
this is for easy acces and it doesn't mess up the main scripts folder or ptokax root.

future[00:51] artificial insanety V2 starting.
[00:51] SQLlite version 3.2.7 launched.
[00:51] menu found and loaded.
[00:51] settings found and loaded.
[00:51] plugins settings found and loaded.
[00:51] scanning the plugins.
[00:51] checking if there are new plugins.
[00:51] checking if there are plugins removed.
[00:51] loading and starting all activated plugins.
[00:51] loaded data file
[00:51] before: 233, after: 224
[00:51] xml were obsolete and removed from the menu.
[00:51] Ready to Kick ass!!
currently trying 2 stuff the plugin settings inside a sqlite database.
a support script for this kind of stuff is gone be made, so in the end no knowledge of sql should be needed 2 be able 2 use it.

plop
Title:
Post by: bluebear on 13 October, 2005, 17:27:36
Looking forward to hear more about it plop :)

Support script ;) <- would probably help a lot of peeps