sqlite 3 for pxlua 5.1
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

sqlite 3 for pxlua 5.1

Started by bluebear, 30 May, 2006, 11:51:45

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bluebear

A un-tested build of liblua-sqlite3 for PXLua 5.1 is attached to this message.
Sincerely,
bluebear
--
http://www.thewildplace.dk/ is is closed - Use the following mirrors instead
http://bluebear.psycho-chihuahua.net
http://pxextension.piratez.dk/
[Lua extensions - Chat stats - YnHub PMSpy - DC Source code - and more]

GeceBekcisi

Is there any change between LUA 5.02 build and this except LUA versions?
Do you need an advanced user handling script? Download UserBekcisi today (Latest Edit)
Features: User + ISP + GeoIP database, user info + share checking and many more...

bluebear

Quote from: GeceBekcisi on 30 May, 2006, 12:06:40
Is there any change between LUA 5.02 build and this except LUA versions?

The build for Lua 5.0.2 is based on lua-sqlite3-0.3
The build for Lua 5.1 is based on lua-sqlite3-0.4.1

For further differences please see the readme.txt,
and consult the documentation provided on
Luaforge.net and in the zipped archive.

There is also probably the need for the borland dependency
wich can be downloaded from one of the mirrored sites.
Sincerely,
bluebear
--
http://www.thewildplace.dk/ is is closed - Use the following mirrors instead
http://bluebear.psycho-chihuahua.net
http://pxextension.piratez.dk/
[Lua extensions - Chat stats - YnHub PMSpy - DC Source code - and more]

Psycho_Chihuahua

Mirror site updated with File and Borland dependencies (incase needed)

http://bluebear.psycho-chihuahua.net/#pxsqll3
PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

bluebear

Quote from: Mutor on 31 May, 2006, 00:22:06
Thanks for the up, bluebear.
You're still my hero.? ? ;D

Humming Stephen Lynch - "If I could be a superhero, I would be programmer-man"...


Btw. has anyone confirmed that this library actually works?
Sincerely,
bluebear
--
http://www.thewildplace.dk/ is is closed - Use the following mirrors instead
http://bluebear.psycho-chihuahua.net
http://pxextension.piratez.dk/
[Lua extensions - Chat stats - YnHub PMSpy - DC Source code - and more]

plop

Quote from: bluebear on 01 June, 2006, 08:56:26
Btw. has anyone confirmed that this library actually works?
Syntax ../PxSQLite3.lua:81: attempt to index global 'sqlite3' (a nil value)

with
local _luaopen_sqlite3 = package.loadlib("pxsqlite3L51.dll", "_luaopen_sqlite3")
_luaopen_sqlite3()

sqlite3.version()


snif snif, more fighting tomorrow.

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

[ZD][Psycho]

Syntax ../PxSQLite3.lua:81: attempt to index global 'sqlite3' (a nil value)

Same problem here. Anybody figure out what's wrong?
"Religion is regarded by the common people as true, by the wise as false, and by rulers as useful." -Seneca

bluebear

I guess none of you got it to work.

I'll fix the problems in the near future.
Sincerely,
bluebear
--
http://www.thewildplace.dk/ is is closed - Use the following mirrors instead
http://bluebear.psycho-chihuahua.net
http://pxextension.piratez.dk/
[Lua extensions - Chat stats - YnHub PMSpy - DC Source code - and more]

Pothead

Fancy writing a dummies guide for how to do it, so i can have a go in the future. :)

bluebear

A guide on howto create a extension for PXLua ?

Actually its rather easy :)

C++ lib for Lua 5.1:

#pragma comment(lib, "PXLua.lib")

extern "C" { // we dont need all of them in this sample, but does not hurt to include all
#  include "lua.h"
#  include "lualib.h"
#  include "lauxlib.h"
};

// The HelloWorld lua function
int lua_helloworld (lua_State *L) {
  if (lua_gettop(L) != 0) { // check no of arguments - we expect none (we dont need to do this in this case, but its just to show how)
    luaL_where(L,1); // at witch line did the error happen in the script
    lua_pushliteral(L, "Function should be called without arguments!"); // push the message
    lua_concat(L, 2); // concat; merge the where-message and the error-message
    lua_error(L); // halt the script and display the message
  }

  lua_pushstring(L, "Hello World!");
  return 1; // the number of objects we pushed onto the stack
}

// table of methods to register
static const luaL_reg our_methods[] = {
  {"FunctionName", lua_helloworld},
  {0,0}
};

// Lua entry point when loading
int __declspec(dllexport) libinit (lua_State* L) {
  luaL_register(L, "TableName", our_methods);
  return 0;
}

-- EOF --

The script:

libinit = package.loadlib("px_helloworld.dll", "_libinit") // the existance of "_" in the entrypoint depends on you compiler options.
libinit()

retval = TableName.FunctionName()
SendToAll(retval)

-- EOF --
Sincerely,
bluebear
--
http://www.thewildplace.dk/ is is closed - Use the following mirrors instead
http://bluebear.psycho-chihuahua.net
http://pxextension.piratez.dk/
[Lua extensions - Chat stats - YnHub PMSpy - DC Source code - and more]

PPK

#10
Updated (0.3.5.1c) PXLua-Sqlite3-0.4.1...
For Lua 5.1.1

Source

Initializing like
require "sqlite3"


This will register global sqlite3 8)
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

PPK

Well, is very hard to use this lib because missing documentation and script needed to use it. Get documentation and script here.
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

SMF spam blocked by CleanTalk