Jump to content
torndeco

extDB (arma3 extension linux/windows)

Recommended Posts

Your are best off to join arma 3 discord and ask for help there.
Majority of your issues are sqf basics and people there will be able to help you out more etc

You also don't seem to know / much SQL experience either
So i recommend you try use inidb extension, atleast until you got more experience with SQF.
Otherwise you be trying to learn SQF & SQL at same time etc

Share this post


Link to post
Share on other sites
On 8.1.2018 at 5:32 PM, Marcel1802 said:

I can connect the database and the server but it does not make any entries in the database

 

Code:

 

"extDB3" callExtension "9:ADD_DATABASE:ftpCoop"//connection to DB,   [ftpCoop] = name in extDB3-conf.ini

"extDB3" callExtension "9:ADD_DATABASE_PROTOCOL:ftpCoop:SQL:SQL_QUERY"//saw that on the internet it works so it's ok

//both works and gets executed in init.sqf

 

"extDB3" callExtension format ["0:SQL_QUERY:INSERT INTO main (steamID, lastUsername) VALUES ('%1','%2')",(getPlayerUID player),(profileName)];

//inserts playerUID (primary key in database) and last username in the database (and other things like date & time, [...]  automatically with CURRENT_TIMESTAMP and other standard values in the database itself)

//doesn't work if the player is already in  the database, but it doesn't crash everything so it's ok
"extDB3" callExtension format ["0:SQL_QUERY:UPDATE main SET steamID='%1', lastUsername='%2' WHERE steamID='%3'",(getPlayerUID player),(profileName),(getPlayerUID player)];

//refreshes data in database

//tried to execute it on different scripts e.g. onPlayerRespawn.sqf, init.sqf, initPlayerLocal.sqf and initPlayerServer.sqf

 

 

If I execute the insertion command in the debug console, it only works if I execute it on the server (not local or global). Then the playerUID is empty and the name is 'arma3'.

The last command doesn't cause any problems if I execute it in the debug console.

 

 

 

 

 

 

 

found a way

 

Made script which gets executed in the init.sqf

In that script there is a infinite loop, first command is 'sleep 300;' so the server doesn't get killed

I gave every unit a variable name, for example 'aaf1' for an aaf soldier

Then I wrote that in in the loop:

 

if(alive aaf1)then{"extDB3" callExtension format["0:SQL_QUERY:INSERT INTO tbl_coopServer (steamID,lastUsername) VALUES ('%1','%2') ON DUPLICATE KEY UPDATE lastTimeUpdate=CURRENT_TIMESTAMP()",(getPlayerUID aaf1),(name aaf1)];};

 

It works perfectly

 

I copied and changed the variable name for every unit

There is a way with a forEach loop and _forEachIndex etc. but this way was easier

I don't wanted to use 'format' for the if-command, so I copied everything.

Share this post


Link to post
Share on other sites

Hello, does extDB support a local database like SQLite? Or would one also have to host a database server?

Share this post


Link to post
Share on other sites

I'm using extdb3 linux version 1.028, in extdb3-conf.ini there are the following lines: 

 

Randomize Config File = true
;; Randomizes Config File after loading.
;;   Recommend to turn on, if you have enabled filepatching on arma.

This causes a seg fault when I restart because @extdb3 can't find the original .ini file. Why would this be recommended, and what are the risks of not randomizing the config file, especially if filepatching is enabled?  Thanks in advance

Share this post


Link to post
Share on other sites

arma3server_x64 released today for Linux systems but we don't have extDB3_x64.so for migration to 64-bit dedicated server. And we don't have source code for compile it to 64bit. Any ideas?

Share this post


Link to post
Share on other sites

I have found the source code, I updaed my repository: https://github.com/SteezCram/extDB3/

 

I try to compile the source code, I have achived to do it on Windows, but unfortunately it does not work on an Arma 3 server but works with the test application.

 

The error that I have is: the application is not a win32 application.

  • Like 1

Share this post


Link to post
Share on other sites

Someone give me a x64 Linux and I recompiled a version for Windows and improve something.

 

I don't know where is Torndeco, but he seems to leave Arma 3.

Share this post


Link to post
Share on other sites

Can i have the last torndeco version, i mean Version 1.032?

SteezCram, do youy have it?

Thanks!

 

Share this post


Link to post
Share on other sites
On 11/10/2020 at 6:14 PM, SteezCram said:

I don't know where is Torndeco, but he seems to leave Arma 3.


I'm getting this with v1033:
 

2021/10/12,  0:57:39 "---------------------------------------------------------------------"
2021/10/12,  0:57:39 "---------------------------------------------------------------------"
2021/10/12,  0:57:41 CallExtension loaded: extDB3 (C:\BRPVP_server_2\@extDB3\extDB3_x64.dll) [extDB3 v1033 Windows]

2021/10/12,  0:57:41 Warning: 2001 ms spent in callExtension calling name: "extDB3", function: "9:VERSION"
2021/10/12,  0:57:41 "extDB3 Loaded"
2021/10/12,  0:57:41 "---------------------------------------------------------------------"
2021/10/12,  0:57:41 "---------------------------------------------------------------------"

 

This warning can cause any problem?

Share this post


Link to post
Share on other sites

Sorry to ask again, i hope this topic is not dead.

 

Can i put the tbbmaloc dlls in another place other than the Arma 3 folder? For example, in @extDB3 folder?

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×