-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathDOCUMENTATION.txt
More file actions
85 lines (65 loc) · 4.61 KB
/
Copy pathDOCUMENTATION.txt
File metadata and controls
85 lines (65 loc) · 4.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
v 1.5 : iniDBI(IMPROVED) by code34 - nicolas_boiteux@yahoo.fr
v 1.4 : iniDBI(IMPROVED) by code34 - nicolas_boiteux@yahoo.fr
v 1.3 : iniDBI(IMPROVED) by code34 - nicolas_boiteux@yahoo.fr
v 1.2 : iniDBI(IMPROVED) by code34 - nicolas_boiteux@yahoo.fr
v 1.1 : iniDBI(IMPROVED) by code34 - nicolas_boiteux@yahoo.fr
v 1.0 : IniDB by SicSemperTyrannis http://raiderbattalion.enjin.com/
Function: iniDB_version
Usage: diag_log call iniDB_version;
Output: the dll version and addon version
----------------------------------------------------------------------------------------------------------------------------------------------
Function: iniDB_exists
Usage: "myDatabaseFile" call iniDB_exists;
Output: true if the database exists as a file, false otherwise
----------------------------------------------------------------------------------------------------------------------------------------------
Function: iniDB_delete
Usage: "myDatabaseFile" call iniDB_delete;
Output: true if the file was deleted successfully, false otherwise
Notes: If you are concerned about security, you can recompile the PBO/DLL without this function.
----------------------------------------------------------------------------------------------------------------------------------------------
Function: iniDB_deletesection
Usage: [databasename, section] call iniDB_deletesection;
Output: true if the section was deleted successfully, false otherwise
----------------------------------------------------------------------------------------------------------------------------------------------
Function: iniDB_deletekey
Usage: [databasename, section, key] call iniDB_deletekey;
Output: true if the key was deleted successfully, false otherwise
----------------------------------------------------------------------------------------------------------------------------------------------
Function: iniDB_read
Prototype: [databasename, section, variablename, ("STRING"|"ARRAY"|"SCALAR")] call iniDB_read;
Usage: ["myDatabaseFile", "sectionname", name player, "STRING"] call iniDB_read;
Usage: ["myDatabaseFile", "sectionname", "position", "ARRAY"] call iniDB_read;
Usage: ["myDatabaseFile", "sectionname", "health", "SCALAR"] call iniDB_read;
output: data
inidb_errno: true if read succeed, false if read failed
data: data return type depends of fourth parameter function. Return empty array, string, or 0, if not set
Notes: fourth parameters musts exist (not like in iniDB where it is optionnal)
----------------------------------------------------------------------------------------------------------------------------------------------
Function: iniDB_write
Prototype: [databasename, section, variablename, value] call iniDB_read;
Usage: ["myDatabaseFile", "sectionname", "position", position player] call iniDB_write;
Usage: ["myDatabaseFile", "sectionname", "health", 100.0] call iniDB_write;
Usage: ["myDatabaseFile", "sectionname", "name", profileName player] call iniDB_write;
Output: true if the write succeeds, false otherwise.
Notes: The fourth parameter is assumed to be a string, array or number (scalar). If it is not, it will save as a string by default. This function automatically derives the type by the variable passed.
Please avoid saving strings or data with the character ' in it, it is an expected bug, but untested.
---------------------------------------------------------------------------------------------------------------------------------------------
Function: iniDB_CRC32
Usage: diag_log "SicSemperTyrannis" call iniDB_CRC32;
Output: "204E6A8B"
Notes: This is a standard implementation and will match PHP and various other languages.
----------------------------------------------------------------------------------------------------------------------------------------------
Function: iniDB_MD5
Usage: diag_log "SicSemperTyrannis" call iniDB_MD5;
Output: "ee89b42582c546fe47d17b14f6331bff"
Notes: This is a standard implementation and will match PHP and various other languages.
----------------------------------------------------------------------------------------------------------------------------------------------
Function: iniDB_Base64Encode
Usage: diag_log "SicSemperTyrannis" call iniDB_Base64Encode;
Output: "U2ljU2VtcGVyVHlyYW5uaXM="
Notes: This is a standard implementation and will match PHP and various other languages.
----------------------------------------------------------------------------------------------------------------------------------------------
Function: iniDB_Base64Decode
Usage: diag_log "U2ljU2VtcGVyVHlyYW5uaXM=" call iniDB_Base64Decode;
Output: "SicSemperTyrannis"
Notes: This is a standard implementation and will match PHP and various other languages.