feat: Add database loading and handle missing ARDB file
All checks were successful
Build / Build (push) Successful in 30s
All checks were successful
Build / Build (push) Successful in 30s
This commit introduces database loading functionality and handles the scenario where the ARDB file is not found. Key changes: * In `addons/db/functions/fnc_init.sqf`, the `load` function is called to initialize the database. * In `extension/src/RAMDb.cs`, a check is added to verify the existence of the ARDB file. If the file is not found, a new database will be created when data is saved, and an info log is generated. * Updated DLL and SO files.
This commit is contained in:
parent
832bdd7385
commit
2fbf0d4ed4
Binary file not shown.
BIN
ArmaRAMDb_x64.so
BIN
ArmaRAMDb_x64.so
Binary file not shown.
@ -31,6 +31,8 @@ ramdb_db_buffer = 10240;
|
|||||||
|
|
||||||
private _dll = "ArmaRAMDb" callExtension ["version", []];
|
private _dll = "ArmaRAMDb" callExtension ["version", []];
|
||||||
|
|
||||||
|
[] call FUNC(load);
|
||||||
|
|
||||||
diag_log text (format ["ArmaRAMDb: DLL Version %1 found", _dll]);
|
diag_log text (format ["ArmaRAMDb: DLL Version %1 found", _dll]);
|
||||||
diag_log text "ArmaRAMDb: Functions loaded and Initializtion completed!";
|
diag_log text "ArmaRAMDb: Functions loaded and Initializtion completed!";
|
||||||
diag_log text (format ["ArmaRAMDb: Buffer size set to %1 Bytes", ramdb_db_buffer]);
|
diag_log text (format ["ArmaRAMDb: Buffer size set to %1 Bytes", ramdb_db_buffer]);
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -89,6 +89,10 @@ namespace ArmaRAMDb
|
|||||||
|
|
||||||
Main.Log("ARDB import complete", "debug");
|
Main.Log("ARDB import complete", "debug");
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Main.Log($"ARDB file not found at path: {_ardbPath}. A new database will be created when data is saved.", "info");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user