@amxts/config-core 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2281 @@
1
+ {
2
+ "format": 1,
3
+ "module": "@amxts/config-core",
4
+ "version": "0.1.0",
5
+ "from": {
6
+ "@amxts/core": {
7
+ "version": "0.1.0",
8
+ "hash": "e3b12482fd1df1dcadee7e27a12ba915d97bf859"
9
+ },
10
+ "@amxts/config-core": {
11
+ "version": "0.1.0",
12
+ "hash": "fcdce20fc0fa51cce2d963ef408be861e44da388"
13
+ }
14
+ },
15
+ "options": {
16
+ "@amxts/config-core": {
17
+ "baseDir": ""
18
+ }
19
+ },
20
+ "forwards": {},
21
+ "places": [
22
+ "config-core.ts",
23
+ "constants.ts",
24
+ "effects.ts",
25
+ "entities.ts",
26
+ "events.ts",
27
+ "facade.ts",
28
+ "flags.ts",
29
+ "fs.ts",
30
+ "hooks.ts",
31
+ "modules/config-core.ts",
32
+ "modules/config-core/src/files.ts",
33
+ "modules/config-core/src/ini-tree.ts",
34
+ "modules/config-core/src/ini.ts",
35
+ "modules/config-core/src/internal.ts",
36
+ "modules/config-core/src/json.ts",
37
+ "modules/config-core/src/tree.ts",
38
+ "modules/config-core/src/types.ts",
39
+ "modules/config-core/src/yaml.ts",
40
+ "natives.ts",
41
+ "os.ts",
42
+ "promise.ts",
43
+ "vector.ts"
44
+ ],
45
+ "natives": [
46
+ {
47
+ "name": "cfg_load_file",
48
+ "params": [
49
+ {
50
+ "name": "fileName",
51
+ "kind": "string",
52
+ "pawnDefault": null
53
+ }
54
+ ],
55
+ "result": "int",
56
+ "doc": "/**\n * Loads a config file from `configs/<base dir>/`; \".ini\" is added when the\n * name has none. A file that is not there still gets a handle, empty.\n */",
57
+ "layout": [
58
+ {
59
+ "param": {
60
+ "name": "fileName",
61
+ "kind": "string",
62
+ "pawnDefault": null
63
+ },
64
+ "index": 0
65
+ }
66
+ ],
67
+ "pawnResult": "ConfigFile",
68
+ "declaration": {
69
+ "name": "cfg_load_file",
70
+ "params": [
71
+ {
72
+ "name": "fileName",
73
+ "type": "any",
74
+ "isArray": true,
75
+ "isRef": false,
76
+ "isConst": true,
77
+ "isRest": false,
78
+ "dimensions": 1
79
+ }
80
+ ],
81
+ "returnType": "ConfigFile",
82
+ "docs": "Loads a configuration file.\n@param fileName File name (e.g. \"menu.ini\"). If no extension is given,\n\".ini\" is appended automatically.\n@return A ConfigFile handle on success, CFG_FILE_INVALID on failure."
83
+ }
84
+ },
85
+ {
86
+ "name": "cfg_get_section",
87
+ "params": [
88
+ {
89
+ "name": "cfg",
90
+ "kind": "tag",
91
+ "pawnDefault": null,
92
+ "tag": "ConfigFile"
93
+ },
94
+ {
95
+ "name": "sectionName",
96
+ "kind": "string",
97
+ "pawnDefault": null
98
+ }
99
+ ],
100
+ "result": "int",
101
+ "doc": "/** A section of a loaded file by its name, or CFG_SECTION_INVALID. */",
102
+ "layout": [
103
+ {
104
+ "param": {
105
+ "name": "cfg",
106
+ "kind": "tag",
107
+ "pawnDefault": null,
108
+ "tag": "ConfigFile"
109
+ },
110
+ "index": 0
111
+ },
112
+ {
113
+ "param": {
114
+ "name": "sectionName",
115
+ "kind": "string",
116
+ "pawnDefault": null
117
+ },
118
+ "index": 1
119
+ }
120
+ ],
121
+ "pawnResult": "ConfigSection",
122
+ "declaration": {
123
+ "name": "cfg_get_section",
124
+ "params": [
125
+ {
126
+ "name": "cfg",
127
+ "type": "ConfigFile",
128
+ "isArray": false,
129
+ "isRef": false,
130
+ "isConst": false,
131
+ "isRest": false
132
+ },
133
+ {
134
+ "name": "sectionName",
135
+ "type": "any",
136
+ "isArray": true,
137
+ "isRef": false,
138
+ "isConst": true,
139
+ "isRest": false,
140
+ "dimensions": 1
141
+ }
142
+ ],
143
+ "returnType": "ConfigSection",
144
+ "docs": "Retrieves a section handle by name from a loaded configuration.\n@param cfg ConfigFile handle returned by cfg_load_file.\n@param sectionName Name of the section to look up.\n@return A ConfigSection handle on success,\nCFG_SECTION_INVALID if not found."
145
+ }
146
+ },
147
+ {
148
+ "name": "cfg_get_value",
149
+ "params": [
150
+ {
151
+ "name": "section",
152
+ "kind": "tag",
153
+ "pawnDefault": null,
154
+ "tag": "ConfigSection"
155
+ },
156
+ {
157
+ "name": "key",
158
+ "kind": "string",
159
+ "pawnDefault": null
160
+ },
161
+ {
162
+ "name": "index",
163
+ "kind": "int",
164
+ "pawnDefault": "0"
165
+ }
166
+ ],
167
+ "result": "string?",
168
+ "doc": "/**\n * The value of a key, or of a path (\"block/subkey\"), into value[]; index is\n * the value's place in its line. false when there is none.\n */",
169
+ "layout": [
170
+ {
171
+ "param": {
172
+ "name": "section",
173
+ "kind": "tag",
174
+ "pawnDefault": null,
175
+ "tag": "ConfigSection"
176
+ },
177
+ "index": 0
178
+ },
179
+ {
180
+ "param": {
181
+ "name": "key",
182
+ "kind": "string",
183
+ "pawnDefault": null
184
+ },
185
+ "index": 1
186
+ },
187
+ {
188
+ "output": "string"
189
+ },
190
+ {
191
+ "param": {
192
+ "name": "index",
193
+ "kind": "int",
194
+ "pawnDefault": "0"
195
+ },
196
+ "index": 2
197
+ }
198
+ ],
199
+ "pawnResult": "bool",
200
+ "declaration": {
201
+ "name": "cfg_get_value",
202
+ "params": [
203
+ {
204
+ "name": "section",
205
+ "type": "ConfigSection",
206
+ "isArray": false,
207
+ "isRef": false,
208
+ "isConst": false,
209
+ "isRest": false
210
+ },
211
+ {
212
+ "name": "key",
213
+ "type": "any",
214
+ "isArray": true,
215
+ "isRef": false,
216
+ "isConst": true,
217
+ "isRest": false,
218
+ "dimensions": 1
219
+ },
220
+ {
221
+ "name": "value",
222
+ "type": "any",
223
+ "isArray": true,
224
+ "isRef": false,
225
+ "isConst": false,
226
+ "isRest": false,
227
+ "dimensions": 1
228
+ },
229
+ {
230
+ "name": "len",
231
+ "type": "any",
232
+ "isArray": false,
233
+ "isRef": false,
234
+ "isConst": false,
235
+ "isRest": false
236
+ },
237
+ {
238
+ "name": "index",
239
+ "type": "any",
240
+ "isArray": false,
241
+ "isRef": false,
242
+ "isConst": false,
243
+ "defaultValue": "0",
244
+ "isRest": false
245
+ }
246
+ ],
247
+ "returnType": "bool",
248
+ "docs": "Retrieves a string value from a section.\n@param section ConfigSection handle.\n@param key Key name or path (e.g. \"key\" or \"block/subkey\").\n@param value Output buffer (recommended size: 512).\n@param len Maximum buffer length.\n@param index Value index for multi-value keys (default: 0).\n@return true if the value was found and written, false otherwise."
249
+ }
250
+ },
251
+ {
252
+ "name": "cfg_get_value_by_path",
253
+ "params": [
254
+ {
255
+ "name": "section",
256
+ "kind": "tag",
257
+ "pawnDefault": null,
258
+ "tag": "ConfigSection"
259
+ },
260
+ {
261
+ "name": "path",
262
+ "kind": "string",
263
+ "pawnDefault": null
264
+ },
265
+ {
266
+ "name": "index",
267
+ "kind": "int",
268
+ "pawnDefault": "0"
269
+ },
270
+ {
271
+ "name": "lineIndex",
272
+ "kind": "int",
273
+ "pawnDefault": "0"
274
+ }
275
+ ],
276
+ "result": "string?",
277
+ "doc": "/** A value by a path: index is its place in the line, lineIndex the row of the block. */",
278
+ "layout": [
279
+ {
280
+ "param": {
281
+ "name": "section",
282
+ "kind": "tag",
283
+ "pawnDefault": null,
284
+ "tag": "ConfigSection"
285
+ },
286
+ "index": 0
287
+ },
288
+ {
289
+ "param": {
290
+ "name": "path",
291
+ "kind": "string",
292
+ "pawnDefault": null
293
+ },
294
+ "index": 1
295
+ },
296
+ {
297
+ "output": "string"
298
+ },
299
+ {
300
+ "param": {
301
+ "name": "index",
302
+ "kind": "int",
303
+ "pawnDefault": "0"
304
+ },
305
+ "index": 2
306
+ },
307
+ {
308
+ "param": {
309
+ "name": "lineIndex",
310
+ "kind": "int",
311
+ "pawnDefault": "0"
312
+ },
313
+ "index": 3
314
+ }
315
+ ],
316
+ "pawnResult": "bool",
317
+ "declaration": {
318
+ "name": "cfg_get_value_by_path",
319
+ "params": [
320
+ {
321
+ "name": "section",
322
+ "type": "ConfigSection",
323
+ "isArray": false,
324
+ "isRef": false,
325
+ "isConst": false,
326
+ "isRest": false
327
+ },
328
+ {
329
+ "name": "path",
330
+ "type": "any",
331
+ "isArray": true,
332
+ "isRef": false,
333
+ "isConst": true,
334
+ "isRest": false,
335
+ "dimensions": 1
336
+ },
337
+ {
338
+ "name": "value",
339
+ "type": "any",
340
+ "isArray": true,
341
+ "isRef": false,
342
+ "isConst": false,
343
+ "isRest": false,
344
+ "dimensions": 1
345
+ },
346
+ {
347
+ "name": "len",
348
+ "type": "any",
349
+ "isArray": false,
350
+ "isRef": false,
351
+ "isConst": false,
352
+ "isRest": false
353
+ },
354
+ {
355
+ "name": "index",
356
+ "type": "any",
357
+ "isArray": false,
358
+ "isRef": false,
359
+ "isConst": false,
360
+ "defaultValue": "0",
361
+ "isRest": false
362
+ },
363
+ {
364
+ "name": "lineIndex",
365
+ "type": "any",
366
+ "isArray": false,
367
+ "isRef": false,
368
+ "isConst": false,
369
+ "defaultValue": "0",
370
+ "isRest": false
371
+ }
372
+ ],
373
+ "returnType": "bool",
374
+ "docs": "Retrieves a string value by its hierarchical path.\n@param section ConfigSection handle.\n@param path Path to the value (e.g. \"MAIN/HUD\").\n@param value Output buffer.\n@param len Maximum buffer length.\n@param index Value index (default: 0).\n@param lineIndex Line index within a block (default: 0).\n@return true if the value was found, false otherwise."
375
+ }
376
+ },
377
+ {
378
+ "name": "cfg_get_int",
379
+ "params": [
380
+ {
381
+ "name": "section",
382
+ "kind": "tag",
383
+ "pawnDefault": null,
384
+ "tag": "ConfigSection"
385
+ },
386
+ {
387
+ "name": "key",
388
+ "kind": "string",
389
+ "pawnDefault": null
390
+ },
391
+ {
392
+ "name": "index",
393
+ "kind": "int",
394
+ "pawnDefault": "0"
395
+ }
396
+ ],
397
+ "result": "int",
398
+ "doc": "/** The whole number a key or path holds; 0 when there is none. */",
399
+ "layout": [
400
+ {
401
+ "param": {
402
+ "name": "section",
403
+ "kind": "tag",
404
+ "pawnDefault": null,
405
+ "tag": "ConfigSection"
406
+ },
407
+ "index": 0
408
+ },
409
+ {
410
+ "param": {
411
+ "name": "key",
412
+ "kind": "string",
413
+ "pawnDefault": null
414
+ },
415
+ "index": 1
416
+ },
417
+ {
418
+ "param": {
419
+ "name": "index",
420
+ "kind": "int",
421
+ "pawnDefault": "0"
422
+ },
423
+ "index": 2
424
+ }
425
+ ],
426
+ "pawnResult": "any",
427
+ "declaration": {
428
+ "name": "cfg_get_int",
429
+ "params": [
430
+ {
431
+ "name": "section",
432
+ "type": "ConfigSection",
433
+ "isArray": false,
434
+ "isRef": false,
435
+ "isConst": false,
436
+ "isRest": false
437
+ },
438
+ {
439
+ "name": "key",
440
+ "type": "any",
441
+ "isArray": true,
442
+ "isRef": false,
443
+ "isConst": true,
444
+ "isRest": false,
445
+ "dimensions": 1
446
+ },
447
+ {
448
+ "name": "index",
449
+ "type": "any",
450
+ "isArray": false,
451
+ "isRef": false,
452
+ "isConst": false,
453
+ "defaultValue": "0",
454
+ "isRest": false
455
+ }
456
+ ],
457
+ "returnType": "any",
458
+ "docs": "Retrieves an integer value from a section.\n@param section ConfigSection handle.\n@param key Key name or path.\n@param index Value index (default: 0).\n@return Integer value, or 0 if not found."
459
+ }
460
+ },
461
+ {
462
+ "name": "cfg_get_float",
463
+ "params": [
464
+ {
465
+ "name": "section",
466
+ "kind": "tag",
467
+ "pawnDefault": null,
468
+ "tag": "ConfigSection"
469
+ },
470
+ {
471
+ "name": "key",
472
+ "kind": "string",
473
+ "pawnDefault": null
474
+ },
475
+ {
476
+ "name": "index",
477
+ "kind": "int",
478
+ "pawnDefault": "0"
479
+ }
480
+ ],
481
+ "result": "float",
482
+ "doc": "/** The number a key or path holds; 0.0 when there is none. */",
483
+ "layout": [
484
+ {
485
+ "param": {
486
+ "name": "section",
487
+ "kind": "tag",
488
+ "pawnDefault": null,
489
+ "tag": "ConfigSection"
490
+ },
491
+ "index": 0
492
+ },
493
+ {
494
+ "param": {
495
+ "name": "key",
496
+ "kind": "string",
497
+ "pawnDefault": null
498
+ },
499
+ "index": 1
500
+ },
501
+ {
502
+ "param": {
503
+ "name": "index",
504
+ "kind": "int",
505
+ "pawnDefault": "0"
506
+ },
507
+ "index": 2
508
+ }
509
+ ],
510
+ "pawnResult": "Float",
511
+ "declaration": {
512
+ "name": "cfg_get_float",
513
+ "params": [
514
+ {
515
+ "name": "section",
516
+ "type": "ConfigSection",
517
+ "isArray": false,
518
+ "isRef": false,
519
+ "isConst": false,
520
+ "isRest": false
521
+ },
522
+ {
523
+ "name": "key",
524
+ "type": "any",
525
+ "isArray": true,
526
+ "isRef": false,
527
+ "isConst": true,
528
+ "isRest": false,
529
+ "dimensions": 1
530
+ },
531
+ {
532
+ "name": "index",
533
+ "type": "any",
534
+ "isArray": false,
535
+ "isRef": false,
536
+ "isConst": false,
537
+ "defaultValue": "0",
538
+ "isRest": false
539
+ }
540
+ ],
541
+ "returnType": "Float",
542
+ "docs": "Retrieves a float value from a section.\n@param section ConfigSection handle.\n@param key Key name or path.\n@param index Value index (default: 0).\n@return Float value, or 0.0 if not found."
543
+ }
544
+ },
545
+ {
546
+ "name": "cfg_get_bool",
547
+ "params": [
548
+ {
549
+ "name": "section",
550
+ "kind": "tag",
551
+ "pawnDefault": null,
552
+ "tag": "ConfigSection"
553
+ },
554
+ {
555
+ "name": "key",
556
+ "kind": "string",
557
+ "pawnDefault": null
558
+ },
559
+ {
560
+ "name": "index",
561
+ "kind": "int",
562
+ "pawnDefault": "0"
563
+ }
564
+ ],
565
+ "result": "bool",
566
+ "doc": "/** true when the value is a whole number other than 0. */",
567
+ "layout": [
568
+ {
569
+ "param": {
570
+ "name": "section",
571
+ "kind": "tag",
572
+ "pawnDefault": null,
573
+ "tag": "ConfigSection"
574
+ },
575
+ "index": 0
576
+ },
577
+ {
578
+ "param": {
579
+ "name": "key",
580
+ "kind": "string",
581
+ "pawnDefault": null
582
+ },
583
+ "index": 1
584
+ },
585
+ {
586
+ "param": {
587
+ "name": "index",
588
+ "kind": "int",
589
+ "pawnDefault": "0"
590
+ },
591
+ "index": 2
592
+ }
593
+ ],
594
+ "pawnResult": "bool",
595
+ "declaration": {
596
+ "name": "cfg_get_bool",
597
+ "params": [
598
+ {
599
+ "name": "section",
600
+ "type": "ConfigSection",
601
+ "isArray": false,
602
+ "isRef": false,
603
+ "isConst": false,
604
+ "isRest": false
605
+ },
606
+ {
607
+ "name": "key",
608
+ "type": "any",
609
+ "isArray": true,
610
+ "isRef": false,
611
+ "isConst": true,
612
+ "isRest": false,
613
+ "dimensions": 1
614
+ },
615
+ {
616
+ "name": "index",
617
+ "type": "any",
618
+ "isArray": false,
619
+ "isRef": false,
620
+ "isConst": false,
621
+ "defaultValue": "0",
622
+ "isRest": false
623
+ }
624
+ ],
625
+ "returnType": "bool",
626
+ "docs": "Retrieves a boolean value from a section.\n@param section ConfigSection handle.\n@param key Key name or path.\n@param index Value index (default: 0).\n@return true if the value is non-zero, false if not found or zero."
627
+ }
628
+ },
629
+ {
630
+ "name": "cfg_get_value_array",
631
+ "params": [
632
+ {
633
+ "name": "section",
634
+ "kind": "tag",
635
+ "pawnDefault": null,
636
+ "tag": "ConfigSection"
637
+ },
638
+ {
639
+ "name": "key",
640
+ "kind": "string",
641
+ "pawnDefault": null
642
+ },
643
+ {
644
+ "name": "index",
645
+ "kind": "int",
646
+ "pawnDefault": "0"
647
+ }
648
+ ],
649
+ "result": "array",
650
+ "doc": "/**\n * The words of a key's line (index: which line, when the key is there more\n * than once); for a block, every value of every row. The caller destroys the\n * array; Invalid_Array when there are no words.\n */",
651
+ "layout": [
652
+ {
653
+ "param": {
654
+ "name": "section",
655
+ "kind": "tag",
656
+ "pawnDefault": null,
657
+ "tag": "ConfigSection"
658
+ },
659
+ "index": 0
660
+ },
661
+ {
662
+ "param": {
663
+ "name": "key",
664
+ "kind": "string",
665
+ "pawnDefault": null
666
+ },
667
+ "index": 1
668
+ },
669
+ {
670
+ "param": {
671
+ "name": "index",
672
+ "kind": "int",
673
+ "pawnDefault": "0"
674
+ },
675
+ "index": 2
676
+ }
677
+ ],
678
+ "pawnResult": "Array",
679
+ "declaration": {
680
+ "name": "cfg_get_value_array",
681
+ "params": [
682
+ {
683
+ "name": "section",
684
+ "type": "ConfigSection",
685
+ "isArray": false,
686
+ "isRef": false,
687
+ "isConst": false,
688
+ "isRest": false
689
+ },
690
+ {
691
+ "name": "key",
692
+ "type": "any",
693
+ "isArray": true,
694
+ "isRef": false,
695
+ "isConst": true,
696
+ "isRest": false,
697
+ "dimensions": 1
698
+ },
699
+ {
700
+ "name": "index",
701
+ "type": "any",
702
+ "isArray": false,
703
+ "isRef": false,
704
+ "isConst": false,
705
+ "defaultValue": "0",
706
+ "isRest": false
707
+ }
708
+ ],
709
+ "returnType": "Array",
710
+ "docs": "Returns a dynamic array of string tokens split from a single config line\n(space-delimited, quote-aware).\n@param section ConfigSection handle.\n@param key Key name or path.\n@param index Line index for multi-value keys (default: 0).\n@return Array handle with string tokens, or Invalid_Array on failure.\nThe caller is responsible for destroying the array."
711
+ }
712
+ },
713
+ {
714
+ "name": "cfg_get_float_array",
715
+ "params": [
716
+ {
717
+ "name": "section",
718
+ "kind": "tag",
719
+ "pawnDefault": null,
720
+ "tag": "ConfigSection"
721
+ },
722
+ {
723
+ "name": "key",
724
+ "kind": "string",
725
+ "pawnDefault": null
726
+ },
727
+ {
728
+ "name": "index",
729
+ "kind": "int",
730
+ "pawnDefault": "0"
731
+ }
732
+ ],
733
+ "result": "array",
734
+ "doc": "/** The numbers of value index as an array of Floats; the caller destroys it. Invalid_Array when there are none. */",
735
+ "layout": [
736
+ {
737
+ "param": {
738
+ "name": "section",
739
+ "kind": "tag",
740
+ "pawnDefault": null,
741
+ "tag": "ConfigSection"
742
+ },
743
+ "index": 0
744
+ },
745
+ {
746
+ "param": {
747
+ "name": "key",
748
+ "kind": "string",
749
+ "pawnDefault": null
750
+ },
751
+ "index": 1
752
+ },
753
+ {
754
+ "param": {
755
+ "name": "index",
756
+ "kind": "int",
757
+ "pawnDefault": "0"
758
+ },
759
+ "index": 2
760
+ }
761
+ ],
762
+ "pawnResult": "Array",
763
+ "declaration": {
764
+ "name": "cfg_get_float_array",
765
+ "params": [
766
+ {
767
+ "name": "section",
768
+ "type": "ConfigSection",
769
+ "isArray": false,
770
+ "isRef": false,
771
+ "isConst": false,
772
+ "isRest": false
773
+ },
774
+ {
775
+ "name": "key",
776
+ "type": "any",
777
+ "isArray": true,
778
+ "isRef": false,
779
+ "isConst": true,
780
+ "isRest": false,
781
+ "dimensions": 1
782
+ },
783
+ {
784
+ "name": "index",
785
+ "type": "any",
786
+ "isArray": false,
787
+ "isRef": false,
788
+ "isConst": false,
789
+ "defaultValue": "0",
790
+ "isRest": false
791
+ }
792
+ ],
793
+ "returnType": "Array",
794
+ "docs": "Returns a dynamic array of float values parsed from a single config line.\n@param section ConfigSection handle.\n@param key Key name or path.\n@param index Line index for multi-value keys (default: 0).\n@return Array handle with Float values, or Invalid_Array on failure.\nThe caller is responsible for destroying the array."
795
+ }
796
+ },
797
+ {
798
+ "name": "cfg_get_value_array_by_path",
799
+ "params": [
800
+ {
801
+ "name": "section",
802
+ "kind": "tag",
803
+ "pawnDefault": null,
804
+ "tag": "ConfigSection"
805
+ },
806
+ {
807
+ "name": "path",
808
+ "kind": "string",
809
+ "pawnDefault": null
810
+ },
811
+ {
812
+ "name": "index",
813
+ "kind": "int",
814
+ "pawnDefault": "0"
815
+ },
816
+ {
817
+ "name": "lineIndex",
818
+ "kind": "int",
819
+ "pawnDefault": "0"
820
+ }
821
+ ],
822
+ "result": "array",
823
+ "doc": "/**\n * Every value of the line a path leads to (lineIndex: the row of a block), as\n * written. The caller destroys the array.\n */",
824
+ "layout": [
825
+ {
826
+ "param": {
827
+ "name": "section",
828
+ "kind": "tag",
829
+ "pawnDefault": null,
830
+ "tag": "ConfigSection"
831
+ },
832
+ "index": 0
833
+ },
834
+ {
835
+ "param": {
836
+ "name": "path",
837
+ "kind": "string",
838
+ "pawnDefault": null
839
+ },
840
+ "index": 1
841
+ },
842
+ {
843
+ "param": {
844
+ "name": "index",
845
+ "kind": "int",
846
+ "pawnDefault": "0"
847
+ },
848
+ "index": 2
849
+ },
850
+ {
851
+ "param": {
852
+ "name": "lineIndex",
853
+ "kind": "int",
854
+ "pawnDefault": "0"
855
+ },
856
+ "index": 3
857
+ }
858
+ ],
859
+ "pawnResult": "Array",
860
+ "declaration": {
861
+ "name": "cfg_get_value_array_by_path",
862
+ "params": [
863
+ {
864
+ "name": "section",
865
+ "type": "ConfigSection",
866
+ "isArray": false,
867
+ "isRef": false,
868
+ "isConst": false,
869
+ "isRest": false
870
+ },
871
+ {
872
+ "name": "path",
873
+ "type": "any",
874
+ "isArray": true,
875
+ "isRef": false,
876
+ "isConst": true,
877
+ "isRest": false,
878
+ "dimensions": 1
879
+ },
880
+ {
881
+ "name": "index",
882
+ "type": "any",
883
+ "isArray": false,
884
+ "isRef": false,
885
+ "isConst": false,
886
+ "defaultValue": "0",
887
+ "isRest": false
888
+ },
889
+ {
890
+ "name": "lineIndex",
891
+ "type": "any",
892
+ "isArray": false,
893
+ "isRef": false,
894
+ "isConst": false,
895
+ "defaultValue": "0",
896
+ "isRest": false
897
+ }
898
+ ],
899
+ "returnType": "Array",
900
+ "docs": "Returns a dynamic array of tokens split from a value found by hierarchical path.\n@param section ConfigSection handle.\n@param path Path to the block (e.g. \"MAIN/HUD\").\n@param index Part index within the value (default: 0).\n@param lineIndex Line index within a block (default: 0).\n@return Array handle with string tokens, or Invalid_Array on failure."
901
+ }
902
+ },
903
+ {
904
+ "name": "cfg_get_top_level_keys",
905
+ "params": [
906
+ {
907
+ "name": "section",
908
+ "kind": "tag",
909
+ "pawnDefault": null,
910
+ "tag": "ConfigSection"
911
+ }
912
+ ],
913
+ "result": "array",
914
+ "doc": "/** The section's keys in file order; Invalid_Array when it has none. */",
915
+ "layout": [
916
+ {
917
+ "param": {
918
+ "name": "section",
919
+ "kind": "tag",
920
+ "pawnDefault": null,
921
+ "tag": "ConfigSection"
922
+ },
923
+ "index": 0
924
+ }
925
+ ],
926
+ "pawnResult": "Array",
927
+ "declaration": {
928
+ "name": "cfg_get_top_level_keys",
929
+ "params": [
930
+ {
931
+ "name": "section",
932
+ "type": "ConfigSection",
933
+ "isArray": false,
934
+ "isRef": false,
935
+ "isConst": false,
936
+ "isRest": false
937
+ }
938
+ ],
939
+ "returnType": "Array",
940
+ "docs": "Returns a dynamic array containing all top-level key names in a section.\n@param section ConfigSection handle.\n@return Array handle with key strings, or Invalid_Array if empty."
941
+ }
942
+ },
943
+ {
944
+ "name": "cfg_get_section_data",
945
+ "params": [
946
+ {
947
+ "name": "section",
948
+ "kind": "tag",
949
+ "pawnDefault": null,
950
+ "tag": "ConfigSection"
951
+ }
952
+ ],
953
+ "result": "array",
954
+ "doc": "/**\n * The whole section, as an array of three: the keys, the values (an array of\n * strings per key, \"{block}\" for a block) and [key, value] index pairs.\n */",
955
+ "layout": [
956
+ {
957
+ "param": {
958
+ "name": "section",
959
+ "kind": "tag",
960
+ "pawnDefault": null,
961
+ "tag": "ConfigSection"
962
+ },
963
+ "index": 0
964
+ }
965
+ ],
966
+ "pawnResult": "Array",
967
+ "declaration": {
968
+ "name": "cfg_get_section_data",
969
+ "params": [
970
+ {
971
+ "name": "section",
972
+ "type": "ConfigSection",
973
+ "isArray": false,
974
+ "isRef": false,
975
+ "isConst": false,
976
+ "isRest": false
977
+ }
978
+ ],
979
+ "returnType": "Array",
980
+ "docs": "Returns the raw section data as an array.\nThe array contains three sub-arrays: keys, values and pair-index mappings.\n@param section ConfigSection handle.\n@return Array handle, or Invalid_Array if the section is empty."
981
+ }
982
+ },
983
+ {
984
+ "name": "cfg_get_array_size",
985
+ "params": [
986
+ {
987
+ "name": "section",
988
+ "kind": "tag",
989
+ "pawnDefault": null,
990
+ "tag": "ConfigSection"
991
+ },
992
+ {
993
+ "name": "key",
994
+ "kind": "string",
995
+ "pawnDefault": null
996
+ }
997
+ ],
998
+ "result": "int",
999
+ "doc": "/** How many values a line has, rows a block has, or - for a key that is there more than once - how many times it is. */",
1000
+ "layout": [
1001
+ {
1002
+ "param": {
1003
+ "name": "section",
1004
+ "kind": "tag",
1005
+ "pawnDefault": null,
1006
+ "tag": "ConfigSection"
1007
+ },
1008
+ "index": 0
1009
+ },
1010
+ {
1011
+ "param": {
1012
+ "name": "key",
1013
+ "kind": "string",
1014
+ "pawnDefault": null
1015
+ },
1016
+ "index": 1
1017
+ }
1018
+ ],
1019
+ "pawnResult": "any",
1020
+ "declaration": {
1021
+ "name": "cfg_get_array_size",
1022
+ "params": [
1023
+ {
1024
+ "name": "section",
1025
+ "type": "ConfigSection",
1026
+ "isArray": false,
1027
+ "isRef": false,
1028
+ "isConst": false,
1029
+ "isRest": false
1030
+ },
1031
+ {
1032
+ "name": "key",
1033
+ "type": "any",
1034
+ "isArray": true,
1035
+ "isRef": false,
1036
+ "isConst": true,
1037
+ "isRest": false,
1038
+ "dimensions": 1
1039
+ }
1040
+ ],
1041
+ "returnType": "any",
1042
+ "docs": "Returns the number of values associated with a key.\n@param section ConfigSection handle.\n@param key Key name or path.\n@return Value count, or 0 if the key is not found."
1043
+ }
1044
+ },
1045
+ {
1046
+ "name": "cfg_set_value",
1047
+ "params": [
1048
+ {
1049
+ "name": "section",
1050
+ "kind": "tag",
1051
+ "pawnDefault": null,
1052
+ "tag": "ConfigSection"
1053
+ },
1054
+ {
1055
+ "name": "key",
1056
+ "kind": "string",
1057
+ "pawnDefault": null
1058
+ },
1059
+ {
1060
+ "name": "value",
1061
+ "kind": "string",
1062
+ "pawnDefault": null
1063
+ },
1064
+ {
1065
+ "name": "index",
1066
+ "kind": "int",
1067
+ "pawnDefault": "0"
1068
+ },
1069
+ {
1070
+ "name": "lineIndex",
1071
+ "kind": "int",
1072
+ "pawnDefault": "0"
1073
+ }
1074
+ ],
1075
+ "result": "bool",
1076
+ "doc": "/** Sets a value; a key that is not there is made. For a block, lineIndex is the row. */",
1077
+ "layout": [
1078
+ {
1079
+ "param": {
1080
+ "name": "section",
1081
+ "kind": "tag",
1082
+ "pawnDefault": null,
1083
+ "tag": "ConfigSection"
1084
+ },
1085
+ "index": 0
1086
+ },
1087
+ {
1088
+ "param": {
1089
+ "name": "key",
1090
+ "kind": "string",
1091
+ "pawnDefault": null
1092
+ },
1093
+ "index": 1
1094
+ },
1095
+ {
1096
+ "param": {
1097
+ "name": "value",
1098
+ "kind": "string",
1099
+ "pawnDefault": null
1100
+ },
1101
+ "index": 2
1102
+ },
1103
+ {
1104
+ "param": {
1105
+ "name": "index",
1106
+ "kind": "int",
1107
+ "pawnDefault": "0"
1108
+ },
1109
+ "index": 3
1110
+ },
1111
+ {
1112
+ "param": {
1113
+ "name": "lineIndex",
1114
+ "kind": "int",
1115
+ "pawnDefault": "0"
1116
+ },
1117
+ "index": 4
1118
+ }
1119
+ ],
1120
+ "pawnResult": "bool",
1121
+ "declaration": {
1122
+ "name": "cfg_set_value",
1123
+ "params": [
1124
+ {
1125
+ "name": "section",
1126
+ "type": "ConfigSection",
1127
+ "isArray": false,
1128
+ "isRef": false,
1129
+ "isConst": false,
1130
+ "isRest": false
1131
+ },
1132
+ {
1133
+ "name": "key",
1134
+ "type": "any",
1135
+ "isArray": true,
1136
+ "isRef": false,
1137
+ "isConst": true,
1138
+ "isRest": false,
1139
+ "dimensions": 1
1140
+ },
1141
+ {
1142
+ "name": "value",
1143
+ "type": "any",
1144
+ "isArray": true,
1145
+ "isRef": false,
1146
+ "isConst": true,
1147
+ "isRest": false,
1148
+ "dimensions": 1
1149
+ },
1150
+ {
1151
+ "name": "index",
1152
+ "type": "any",
1153
+ "isArray": false,
1154
+ "isRef": false,
1155
+ "isConst": false,
1156
+ "defaultValue": "0",
1157
+ "isRest": false
1158
+ },
1159
+ {
1160
+ "name": "lineIndex",
1161
+ "type": "any",
1162
+ "isArray": false,
1163
+ "isRef": false,
1164
+ "isConst": false,
1165
+ "defaultValue": "0",
1166
+ "isRest": false
1167
+ }
1168
+ ],
1169
+ "returnType": "bool",
1170
+ "docs": "Sets a string value for a key.\n@param section ConfigSection handle.\n@param key Key name.\n@param value String value to set.\n@param index Value index (default: 0).\n@return true on success, false otherwise."
1171
+ }
1172
+ },
1173
+ {
1174
+ "name": "cfg_set_int",
1175
+ "params": [
1176
+ {
1177
+ "name": "section",
1178
+ "kind": "tag",
1179
+ "pawnDefault": null,
1180
+ "tag": "ConfigSection"
1181
+ },
1182
+ {
1183
+ "name": "key",
1184
+ "kind": "string",
1185
+ "pawnDefault": null
1186
+ },
1187
+ {
1188
+ "name": "value",
1189
+ "kind": "int",
1190
+ "pawnDefault": null
1191
+ },
1192
+ {
1193
+ "name": "index",
1194
+ "kind": "int",
1195
+ "pawnDefault": "0"
1196
+ }
1197
+ ],
1198
+ "result": "bool",
1199
+ "doc": "/** Sets a whole number. */",
1200
+ "layout": [
1201
+ {
1202
+ "param": {
1203
+ "name": "section",
1204
+ "kind": "tag",
1205
+ "pawnDefault": null,
1206
+ "tag": "ConfigSection"
1207
+ },
1208
+ "index": 0
1209
+ },
1210
+ {
1211
+ "param": {
1212
+ "name": "key",
1213
+ "kind": "string",
1214
+ "pawnDefault": null
1215
+ },
1216
+ "index": 1
1217
+ },
1218
+ {
1219
+ "param": {
1220
+ "name": "value",
1221
+ "kind": "int",
1222
+ "pawnDefault": null
1223
+ },
1224
+ "index": 2
1225
+ },
1226
+ {
1227
+ "param": {
1228
+ "name": "index",
1229
+ "kind": "int",
1230
+ "pawnDefault": "0"
1231
+ },
1232
+ "index": 3
1233
+ }
1234
+ ],
1235
+ "pawnResult": "bool",
1236
+ "declaration": {
1237
+ "name": "cfg_set_int",
1238
+ "params": [
1239
+ {
1240
+ "name": "section",
1241
+ "type": "ConfigSection",
1242
+ "isArray": false,
1243
+ "isRef": false,
1244
+ "isConst": false,
1245
+ "isRest": false
1246
+ },
1247
+ {
1248
+ "name": "key",
1249
+ "type": "any",
1250
+ "isArray": true,
1251
+ "isRef": false,
1252
+ "isConst": true,
1253
+ "isRest": false,
1254
+ "dimensions": 1
1255
+ },
1256
+ {
1257
+ "name": "value",
1258
+ "type": "any",
1259
+ "isArray": false,
1260
+ "isRef": false,
1261
+ "isConst": false,
1262
+ "isRest": false
1263
+ },
1264
+ {
1265
+ "name": "index",
1266
+ "type": "any",
1267
+ "isArray": false,
1268
+ "isRef": false,
1269
+ "isConst": false,
1270
+ "defaultValue": "0",
1271
+ "isRest": false
1272
+ }
1273
+ ],
1274
+ "returnType": "bool",
1275
+ "docs": "Sets an integer value for a key.\n@param section ConfigSection handle.\n@param key Key name.\n@param value Integer value.\n@param index Value index (default: 0).\n@return true on success, false otherwise."
1276
+ }
1277
+ },
1278
+ {
1279
+ "name": "cfg_set_float",
1280
+ "params": [
1281
+ {
1282
+ "name": "section",
1283
+ "kind": "tag",
1284
+ "pawnDefault": null,
1285
+ "tag": "ConfigSection"
1286
+ },
1287
+ {
1288
+ "name": "key",
1289
+ "kind": "string",
1290
+ "pawnDefault": null
1291
+ },
1292
+ {
1293
+ "name": "value",
1294
+ "kind": "float",
1295
+ "pawnDefault": null
1296
+ },
1297
+ {
1298
+ "name": "index",
1299
+ "kind": "int",
1300
+ "pawnDefault": "0"
1301
+ }
1302
+ ],
1303
+ "result": "bool",
1304
+ "doc": "/** Sets a number; it is written as it was given, 2.5 as \"2.5\". */",
1305
+ "layout": [
1306
+ {
1307
+ "param": {
1308
+ "name": "section",
1309
+ "kind": "tag",
1310
+ "pawnDefault": null,
1311
+ "tag": "ConfigSection"
1312
+ },
1313
+ "index": 0
1314
+ },
1315
+ {
1316
+ "param": {
1317
+ "name": "key",
1318
+ "kind": "string",
1319
+ "pawnDefault": null
1320
+ },
1321
+ "index": 1
1322
+ },
1323
+ {
1324
+ "param": {
1325
+ "name": "value",
1326
+ "kind": "float",
1327
+ "pawnDefault": null
1328
+ },
1329
+ "index": 2
1330
+ },
1331
+ {
1332
+ "param": {
1333
+ "name": "index",
1334
+ "kind": "int",
1335
+ "pawnDefault": "0"
1336
+ },
1337
+ "index": 3
1338
+ }
1339
+ ],
1340
+ "pawnResult": "bool",
1341
+ "declaration": {
1342
+ "name": "cfg_set_float",
1343
+ "params": [
1344
+ {
1345
+ "name": "section",
1346
+ "type": "ConfigSection",
1347
+ "isArray": false,
1348
+ "isRef": false,
1349
+ "isConst": false,
1350
+ "isRest": false
1351
+ },
1352
+ {
1353
+ "name": "key",
1354
+ "type": "any",
1355
+ "isArray": true,
1356
+ "isRef": false,
1357
+ "isConst": true,
1358
+ "isRest": false,
1359
+ "dimensions": 1
1360
+ },
1361
+ {
1362
+ "name": "value",
1363
+ "type": "Float",
1364
+ "isArray": false,
1365
+ "isRef": false,
1366
+ "isConst": false,
1367
+ "isRest": false
1368
+ },
1369
+ {
1370
+ "name": "index",
1371
+ "type": "any",
1372
+ "isArray": false,
1373
+ "isRef": false,
1374
+ "isConst": false,
1375
+ "defaultValue": "0",
1376
+ "isRest": false
1377
+ }
1378
+ ],
1379
+ "returnType": "bool",
1380
+ "docs": "Sets a float value for a key.\n@param section ConfigSection handle.\n@param key Key name.\n@param value Float value.\n@param index Value index (default: 0).\n@return true on success, false otherwise."
1381
+ }
1382
+ },
1383
+ {
1384
+ "name": "cfg_set_bool",
1385
+ "params": [
1386
+ {
1387
+ "name": "section",
1388
+ "kind": "tag",
1389
+ "pawnDefault": null,
1390
+ "tag": "ConfigSection"
1391
+ },
1392
+ {
1393
+ "name": "key",
1394
+ "kind": "string",
1395
+ "pawnDefault": null
1396
+ },
1397
+ {
1398
+ "name": "value",
1399
+ "kind": "bool",
1400
+ "pawnDefault": null
1401
+ },
1402
+ {
1403
+ "name": "index",
1404
+ "kind": "int",
1405
+ "pawnDefault": "0"
1406
+ }
1407
+ ],
1408
+ "result": "bool",
1409
+ "doc": "/** Sets 1 or 0. */",
1410
+ "layout": [
1411
+ {
1412
+ "param": {
1413
+ "name": "section",
1414
+ "kind": "tag",
1415
+ "pawnDefault": null,
1416
+ "tag": "ConfigSection"
1417
+ },
1418
+ "index": 0
1419
+ },
1420
+ {
1421
+ "param": {
1422
+ "name": "key",
1423
+ "kind": "string",
1424
+ "pawnDefault": null
1425
+ },
1426
+ "index": 1
1427
+ },
1428
+ {
1429
+ "param": {
1430
+ "name": "value",
1431
+ "kind": "bool",
1432
+ "pawnDefault": null
1433
+ },
1434
+ "index": 2
1435
+ },
1436
+ {
1437
+ "param": {
1438
+ "name": "index",
1439
+ "kind": "int",
1440
+ "pawnDefault": "0"
1441
+ },
1442
+ "index": 3
1443
+ }
1444
+ ],
1445
+ "pawnResult": "bool",
1446
+ "declaration": {
1447
+ "name": "cfg_set_bool",
1448
+ "params": [
1449
+ {
1450
+ "name": "section",
1451
+ "type": "ConfigSection",
1452
+ "isArray": false,
1453
+ "isRef": false,
1454
+ "isConst": false,
1455
+ "isRest": false
1456
+ },
1457
+ {
1458
+ "name": "key",
1459
+ "type": "any",
1460
+ "isArray": true,
1461
+ "isRef": false,
1462
+ "isConst": true,
1463
+ "isRest": false,
1464
+ "dimensions": 1
1465
+ },
1466
+ {
1467
+ "name": "value",
1468
+ "type": "bool",
1469
+ "isArray": false,
1470
+ "isRef": false,
1471
+ "isConst": false,
1472
+ "isRest": false
1473
+ },
1474
+ {
1475
+ "name": "index",
1476
+ "type": "any",
1477
+ "isArray": false,
1478
+ "isRef": false,
1479
+ "isConst": false,
1480
+ "defaultValue": "0",
1481
+ "isRest": false
1482
+ }
1483
+ ],
1484
+ "returnType": "bool",
1485
+ "docs": "Sets a boolean value for a key.\n@param section ConfigSection handle.\n@param key Key name.\n@param value Boolean value.\n@param index Value index (default: 0).\n@return true on success, false otherwise."
1486
+ }
1487
+ },
1488
+ {
1489
+ "name": "cfg_delete_key",
1490
+ "params": [
1491
+ {
1492
+ "name": "section",
1493
+ "kind": "tag",
1494
+ "pawnDefault": null,
1495
+ "tag": "ConfigSection"
1496
+ },
1497
+ {
1498
+ "name": "key",
1499
+ "kind": "string",
1500
+ "pawnDefault": null
1501
+ }
1502
+ ],
1503
+ "result": "bool",
1504
+ "doc": "/** Removes every entry of the key; false when there was none. */",
1505
+ "layout": [
1506
+ {
1507
+ "param": {
1508
+ "name": "section",
1509
+ "kind": "tag",
1510
+ "pawnDefault": null,
1511
+ "tag": "ConfigSection"
1512
+ },
1513
+ "index": 0
1514
+ },
1515
+ {
1516
+ "param": {
1517
+ "name": "key",
1518
+ "kind": "string",
1519
+ "pawnDefault": null
1520
+ },
1521
+ "index": 1
1522
+ }
1523
+ ],
1524
+ "pawnResult": "bool",
1525
+ "declaration": {
1526
+ "name": "cfg_delete_key",
1527
+ "params": [
1528
+ {
1529
+ "name": "section",
1530
+ "type": "ConfigSection",
1531
+ "isArray": false,
1532
+ "isRef": false,
1533
+ "isConst": false,
1534
+ "isRest": false
1535
+ },
1536
+ {
1537
+ "name": "key",
1538
+ "type": "any",
1539
+ "isArray": true,
1540
+ "isRef": false,
1541
+ "isConst": true,
1542
+ "isRest": false,
1543
+ "dimensions": 1
1544
+ }
1545
+ ],
1546
+ "returnType": "bool",
1547
+ "docs": "Deletes a key from a section.\n@param section ConfigSection handle.\n@param key Key to delete.\n@return true if deleted, false if not found or section is invalid."
1548
+ }
1549
+ },
1550
+ {
1551
+ "name": "cfg_has_key",
1552
+ "params": [
1553
+ {
1554
+ "name": "section",
1555
+ "kind": "tag",
1556
+ "pawnDefault": null,
1557
+ "tag": "ConfigSection"
1558
+ },
1559
+ {
1560
+ "name": "key",
1561
+ "kind": "string",
1562
+ "pawnDefault": null
1563
+ }
1564
+ ],
1565
+ "result": "bool",
1566
+ "doc": "/** Whether the section has the key. */",
1567
+ "layout": [
1568
+ {
1569
+ "param": {
1570
+ "name": "section",
1571
+ "kind": "tag",
1572
+ "pawnDefault": null,
1573
+ "tag": "ConfigSection"
1574
+ },
1575
+ "index": 0
1576
+ },
1577
+ {
1578
+ "param": {
1579
+ "name": "key",
1580
+ "kind": "string",
1581
+ "pawnDefault": null
1582
+ },
1583
+ "index": 1
1584
+ }
1585
+ ],
1586
+ "pawnResult": "bool",
1587
+ "declaration": {
1588
+ "name": "cfg_has_key",
1589
+ "params": [
1590
+ {
1591
+ "name": "section",
1592
+ "type": "ConfigSection",
1593
+ "isArray": false,
1594
+ "isRef": false,
1595
+ "isConst": false,
1596
+ "isRest": false
1597
+ },
1598
+ {
1599
+ "name": "key",
1600
+ "type": "any",
1601
+ "isArray": true,
1602
+ "isRef": false,
1603
+ "isConst": true,
1604
+ "isRest": false,
1605
+ "dimensions": 1
1606
+ }
1607
+ ],
1608
+ "returnType": "bool",
1609
+ "docs": "Checks whether a key exists in a section.\n@param section ConfigSection handle.\n@param key Key to check.\n@return true if the key exists, false otherwise."
1610
+ }
1611
+ },
1612
+ {
1613
+ "name": "cfg_create_section",
1614
+ "params": [
1615
+ {
1616
+ "name": "cfg",
1617
+ "kind": "tag",
1618
+ "pawnDefault": null,
1619
+ "tag": "ConfigFile"
1620
+ },
1621
+ {
1622
+ "name": "sectionName",
1623
+ "kind": "string",
1624
+ "pawnDefault": null
1625
+ }
1626
+ ],
1627
+ "result": "int",
1628
+ "doc": "/** A section of the file; one that is not there is made, in memory. */",
1629
+ "layout": [
1630
+ {
1631
+ "param": {
1632
+ "name": "cfg",
1633
+ "kind": "tag",
1634
+ "pawnDefault": null,
1635
+ "tag": "ConfigFile"
1636
+ },
1637
+ "index": 0
1638
+ },
1639
+ {
1640
+ "param": {
1641
+ "name": "sectionName",
1642
+ "kind": "string",
1643
+ "pawnDefault": null
1644
+ },
1645
+ "index": 1
1646
+ }
1647
+ ],
1648
+ "pawnResult": "ConfigSection",
1649
+ "declaration": {
1650
+ "name": "cfg_create_section",
1651
+ "params": [
1652
+ {
1653
+ "name": "cfg",
1654
+ "type": "ConfigFile",
1655
+ "isArray": false,
1656
+ "isRef": false,
1657
+ "isConst": false,
1658
+ "isRest": false
1659
+ },
1660
+ {
1661
+ "name": "sectionName",
1662
+ "type": "any",
1663
+ "isArray": true,
1664
+ "isRef": false,
1665
+ "isConst": true,
1666
+ "isRest": false,
1667
+ "dimensions": 1
1668
+ }
1669
+ ],
1670
+ "returnType": "ConfigSection",
1671
+ "docs": "Creates a new in-memory section (not backed by a file).\n@param sectionName Name of the new section.\n@return ConfigSection handle on success, CFG_SECTION_INVALID on failure."
1672
+ }
1673
+ },
1674
+ {
1675
+ "name": "cfg_set_entry_type",
1676
+ "params": [
1677
+ {
1678
+ "name": "section",
1679
+ "kind": "tag",
1680
+ "pawnDefault": null,
1681
+ "tag": "ConfigSection"
1682
+ },
1683
+ {
1684
+ "name": "key",
1685
+ "kind": "string",
1686
+ "pawnDefault": null
1687
+ },
1688
+ {
1689
+ "name": "entryType",
1690
+ "kind": "tag",
1691
+ "pawnDefault": null,
1692
+ "tag": "EntryType"
1693
+ }
1694
+ ],
1695
+ "result": "bool",
1696
+ "doc": "/** Makes the key a line of values or a block; a key that is not there is made. */",
1697
+ "layout": [
1698
+ {
1699
+ "param": {
1700
+ "name": "section",
1701
+ "kind": "tag",
1702
+ "pawnDefault": null,
1703
+ "tag": "ConfigSection"
1704
+ },
1705
+ "index": 0
1706
+ },
1707
+ {
1708
+ "param": {
1709
+ "name": "key",
1710
+ "kind": "string",
1711
+ "pawnDefault": null
1712
+ },
1713
+ "index": 1
1714
+ },
1715
+ {
1716
+ "param": {
1717
+ "name": "entryType",
1718
+ "kind": "tag",
1719
+ "pawnDefault": null,
1720
+ "tag": "EntryType"
1721
+ },
1722
+ "index": 2
1723
+ }
1724
+ ],
1725
+ "pawnResult": "bool",
1726
+ "declaration": {
1727
+ "name": "cfg_set_entry_type",
1728
+ "params": [
1729
+ {
1730
+ "name": "section",
1731
+ "type": "ConfigSection",
1732
+ "isArray": false,
1733
+ "isRef": false,
1734
+ "isConst": false,
1735
+ "isRest": false
1736
+ },
1737
+ {
1738
+ "name": "key",
1739
+ "type": "any",
1740
+ "isArray": true,
1741
+ "isRef": false,
1742
+ "isConst": true,
1743
+ "isRest": false,
1744
+ "dimensions": 1
1745
+ },
1746
+ {
1747
+ "name": "entryType",
1748
+ "type": "EntryType",
1749
+ "isArray": false,
1750
+ "isRef": false,
1751
+ "isConst": false,
1752
+ "isRest": false
1753
+ }
1754
+ ],
1755
+ "returnType": "bool",
1756
+ "docs": "Sets the EntryType for a key in a section.\n@param section ConfigSection handle.\n@param key Key name.\n@param entryType CFG_ENTRY_SIMPLE or CFG_ENTRY_BRACKET.\n@return true on success, false otherwise."
1757
+ }
1758
+ },
1759
+ {
1760
+ "name": "cfg_set_entry_content_type",
1761
+ "params": [
1762
+ {
1763
+ "name": "section",
1764
+ "kind": "tag",
1765
+ "pawnDefault": null,
1766
+ "tag": "ConfigSection"
1767
+ },
1768
+ {
1769
+ "name": "key",
1770
+ "kind": "string",
1771
+ "pawnDefault": null
1772
+ },
1773
+ {
1774
+ "name": "contentType",
1775
+ "kind": "tag",
1776
+ "pawnDefault": null,
1777
+ "tag": "ContentType"
1778
+ }
1779
+ ],
1780
+ "result": "bool",
1781
+ "doc": "/** Says what the key holds; a key that is not there is made. */",
1782
+ "layout": [
1783
+ {
1784
+ "param": {
1785
+ "name": "section",
1786
+ "kind": "tag",
1787
+ "pawnDefault": null,
1788
+ "tag": "ConfigSection"
1789
+ },
1790
+ "index": 0
1791
+ },
1792
+ {
1793
+ "param": {
1794
+ "name": "key",
1795
+ "kind": "string",
1796
+ "pawnDefault": null
1797
+ },
1798
+ "index": 1
1799
+ },
1800
+ {
1801
+ "param": {
1802
+ "name": "contentType",
1803
+ "kind": "tag",
1804
+ "pawnDefault": null,
1805
+ "tag": "ContentType"
1806
+ },
1807
+ "index": 2
1808
+ }
1809
+ ],
1810
+ "pawnResult": "bool",
1811
+ "declaration": {
1812
+ "name": "cfg_set_entry_content_type",
1813
+ "params": [
1814
+ {
1815
+ "name": "section",
1816
+ "type": "ConfigSection",
1817
+ "isArray": false,
1818
+ "isRef": false,
1819
+ "isConst": false,
1820
+ "isRest": false
1821
+ },
1822
+ {
1823
+ "name": "key",
1824
+ "type": "any",
1825
+ "isArray": true,
1826
+ "isRef": false,
1827
+ "isConst": true,
1828
+ "isRest": false,
1829
+ "dimensions": 1
1830
+ },
1831
+ {
1832
+ "name": "contentType",
1833
+ "type": "ContentType",
1834
+ "isArray": false,
1835
+ "isRef": false,
1836
+ "isConst": false,
1837
+ "isRest": false
1838
+ }
1839
+ ],
1840
+ "returnType": "bool",
1841
+ "docs": "Sets the ContentType for a key in a section.\n@param section ConfigSection handle.\n@param key Key name.\n@param contentType CFG_CONTENT_SIMPLE, CFG_CONTENT_STRINGS or CFG_CONTENT_ENTRIES.\n@return true on success, false otherwise."
1842
+ }
1843
+ },
1844
+ {
1845
+ "name": "cfg_write_file",
1846
+ "params": [
1847
+ {
1848
+ "name": "cfg",
1849
+ "kind": "tag",
1850
+ "pawnDefault": null,
1851
+ "tag": "ConfigFile"
1852
+ },
1853
+ {
1854
+ "name": "fileName",
1855
+ "kind": "string",
1856
+ "pawnDefault": null
1857
+ },
1858
+ {
1859
+ "name": "sectionName",
1860
+ "kind": "string",
1861
+ "pawnDefault": null
1862
+ }
1863
+ ],
1864
+ "result": "bool",
1865
+ "doc": "/**\n * Writes one section to a file; the file's other sections are not in it.\n * With cfg = CFG_FILE_INVALID the section is looked for in every loaded file.\n */",
1866
+ "layout": [
1867
+ {
1868
+ "param": {
1869
+ "name": "cfg",
1870
+ "kind": "tag",
1871
+ "pawnDefault": null,
1872
+ "tag": "ConfigFile"
1873
+ },
1874
+ "index": 0
1875
+ },
1876
+ {
1877
+ "param": {
1878
+ "name": "fileName",
1879
+ "kind": "string",
1880
+ "pawnDefault": null
1881
+ },
1882
+ "index": 1
1883
+ },
1884
+ {
1885
+ "param": {
1886
+ "name": "sectionName",
1887
+ "kind": "string",
1888
+ "pawnDefault": null
1889
+ },
1890
+ "index": 2
1891
+ }
1892
+ ],
1893
+ "pawnResult": "bool",
1894
+ "declaration": {
1895
+ "name": "cfg_write_file",
1896
+ "params": [
1897
+ {
1898
+ "name": "cfg",
1899
+ "type": "ConfigFile",
1900
+ "isArray": false,
1901
+ "isRef": false,
1902
+ "isConst": false,
1903
+ "isRest": false
1904
+ },
1905
+ {
1906
+ "name": "fileName",
1907
+ "type": "any",
1908
+ "isArray": true,
1909
+ "isRef": false,
1910
+ "isConst": true,
1911
+ "isRest": false,
1912
+ "dimensions": 1
1913
+ },
1914
+ {
1915
+ "name": "sectionName",
1916
+ "type": "any",
1917
+ "isArray": true,
1918
+ "isRef": false,
1919
+ "isConst": true,
1920
+ "isRest": false,
1921
+ "dimensions": 1
1922
+ }
1923
+ ],
1924
+ "returnType": "bool",
1925
+ "docs": "Writes a section to a file.\nCan be called with 2 arguments (fileName, sectionName) or with 3 arguments\n(ConfigFile:cfg, fileName, sectionName) when you need to target a specific\nloaded file handle.\n@param fileName Destination file name (e.g. \"core.ini\").\n@param sectionName Section name to write.\n@return true on success, false otherwise."
1926
+ }
1927
+ },
1928
+ {
1929
+ "name": "cfg_save_config",
1930
+ "params": [
1931
+ {
1932
+ "name": "cfg",
1933
+ "kind": "tag",
1934
+ "pawnDefault": null,
1935
+ "tag": "ConfigFile"
1936
+ },
1937
+ {
1938
+ "name": "fileName",
1939
+ "kind": "string",
1940
+ "pawnDefault": "\"\""
1941
+ }
1942
+ ],
1943
+ "result": "bool",
1944
+ "doc": "/**\n * Saves every section of the file with the comments it was read with. The\n * file name has to be given: without one it returns false.\n */",
1945
+ "layout": [
1946
+ {
1947
+ "param": {
1948
+ "name": "cfg",
1949
+ "kind": "tag",
1950
+ "pawnDefault": null,
1951
+ "tag": "ConfigFile"
1952
+ },
1953
+ "index": 0
1954
+ },
1955
+ {
1956
+ "param": {
1957
+ "name": "fileName",
1958
+ "kind": "string",
1959
+ "pawnDefault": "\"\""
1960
+ },
1961
+ "index": 1
1962
+ }
1963
+ ],
1964
+ "pawnResult": "bool",
1965
+ "declaration": {
1966
+ "name": "cfg_save_config",
1967
+ "params": [
1968
+ {
1969
+ "name": "cfg",
1970
+ "type": "ConfigFile",
1971
+ "isArray": false,
1972
+ "isRef": false,
1973
+ "isConst": false,
1974
+ "isRest": false
1975
+ },
1976
+ {
1977
+ "name": "fileName",
1978
+ "type": "any",
1979
+ "isArray": true,
1980
+ "isRef": false,
1981
+ "isConst": true,
1982
+ "defaultValue": "\"\"",
1983
+ "isRest": false,
1984
+ "dimensions": 1
1985
+ }
1986
+ ],
1987
+ "returnType": "bool",
1988
+ "docs": "Saves a loaded configuration back to its source file.\n';' comment lines are round-tripped: a comment block is re-emitted before the\nelement it preceded in the source (section / top-level key / bracket row).\nOnly comments that were present in the loaded file survive — elements created\nprogrammatically (e.g. via cfg_set_value) carry no comment unless one already\nexisted on that row. Pass fileName explicitly for multi-section files.\n@param cfg ConfigFile handle returned by cfg_load_file.\n@return true on success, false otherwise."
1989
+ }
1990
+ },
1991
+ {
1992
+ "name": "cfg_set_base_dir",
1993
+ "params": [
1994
+ {
1995
+ "name": "dir",
1996
+ "kind": "string",
1997
+ "pawnDefault": null
1998
+ }
1999
+ ],
2000
+ "result": "void",
2001
+ "doc": "/** The folder under configs/ that file names are relative to. */",
2002
+ "layout": [
2003
+ {
2004
+ "param": {
2005
+ "name": "dir",
2006
+ "kind": "string",
2007
+ "pawnDefault": null
2008
+ },
2009
+ "index": 0
2010
+ }
2011
+ ],
2012
+ "pawnResult": "any",
2013
+ "declaration": {
2014
+ "name": "cfg_set_base_dir",
2015
+ "params": [
2016
+ {
2017
+ "name": "dir",
2018
+ "type": "any",
2019
+ "isArray": true,
2020
+ "isRef": false,
2021
+ "isConst": true,
2022
+ "isRest": false,
2023
+ "dimensions": 1
2024
+ }
2025
+ ],
2026
+ "returnType": "any",
2027
+ "docs": "Sets the base directory used when resolving relative config file names.\n@param dir Path to the directory (e.g. \"addons/amxmodx/configs/jbe\")."
2028
+ }
2029
+ },
2030
+ {
2031
+ "name": "cfg_get_sections_count",
2032
+ "params": [],
2033
+ "result": "int",
2034
+ "doc": "/** How many sections are loaded, across every file. */",
2035
+ "layout": [],
2036
+ "pawnResult": "any",
2037
+ "declaration": {
2038
+ "name": "cfg_get_sections_count",
2039
+ "params": [],
2040
+ "returnType": "any",
2041
+ "docs": "Returns the total number of sections currently loaded in memory.\n@return Section count."
2042
+ }
2043
+ },
2044
+ {
2045
+ "name": "cfg_get_section_name",
2046
+ "params": [
2047
+ {
2048
+ "name": "index",
2049
+ "kind": "int",
2050
+ "pawnDefault": null
2051
+ }
2052
+ ],
2053
+ "result": "string?",
2054
+ "doc": "/** A section's name by its number, 0 .. cfg_get_sections_count() - 1. */",
2055
+ "layout": [
2056
+ {
2057
+ "param": {
2058
+ "name": "index",
2059
+ "kind": "int",
2060
+ "pawnDefault": null
2061
+ },
2062
+ "index": 0
2063
+ },
2064
+ {
2065
+ "output": "string"
2066
+ }
2067
+ ],
2068
+ "pawnResult": "any",
2069
+ "declaration": {
2070
+ "name": "cfg_get_section_name",
2071
+ "params": [
2072
+ {
2073
+ "name": "index",
2074
+ "type": "any",
2075
+ "isArray": false,
2076
+ "isRef": false,
2077
+ "isConst": false,
2078
+ "isRest": false
2079
+ },
2080
+ {
2081
+ "name": "name",
2082
+ "type": "any",
2083
+ "isArray": true,
2084
+ "isRef": false,
2085
+ "isConst": false,
2086
+ "isRest": false,
2087
+ "dimensions": 1
2088
+ },
2089
+ {
2090
+ "name": "len",
2091
+ "type": "any",
2092
+ "isArray": false,
2093
+ "isRef": false,
2094
+ "isConst": false,
2095
+ "isRest": false
2096
+ }
2097
+ ],
2098
+ "returnType": "any",
2099
+ "docs": "Returns the name of a loaded section by its sequential index.\n@param index Zero-based section index (0 .. cfg_get_sections_count() - 1).\n@param name Output buffer for the section name.\n@param len Maximum buffer length.\n@return 1 on success, 0 if the index is out of range."
2100
+ }
2101
+ },
2102
+ {
2103
+ "name": "cfg_set_row_comment",
2104
+ "params": [
2105
+ {
2106
+ "name": "section",
2107
+ "kind": "tag",
2108
+ "pawnDefault": null,
2109
+ "tag": "ConfigSection"
2110
+ },
2111
+ {
2112
+ "name": "key",
2113
+ "kind": "string",
2114
+ "pawnDefault": null
2115
+ },
2116
+ {
2117
+ "name": "row",
2118
+ "kind": "int",
2119
+ "pawnDefault": null
2120
+ },
2121
+ {
2122
+ "name": "comment",
2123
+ "kind": "string",
2124
+ "pawnDefault": null
2125
+ }
2126
+ ],
2127
+ "result": "bool",
2128
+ "doc": "/**\n * The comment line written above row `row` of the block `key` - \"; ID | VALUE\",\n * say; \"\" removes it. false when there is no such block or row.\n */",
2129
+ "layout": [
2130
+ {
2131
+ "param": {
2132
+ "name": "section",
2133
+ "kind": "tag",
2134
+ "pawnDefault": null,
2135
+ "tag": "ConfigSection"
2136
+ },
2137
+ "index": 0
2138
+ },
2139
+ {
2140
+ "param": {
2141
+ "name": "key",
2142
+ "kind": "string",
2143
+ "pawnDefault": null
2144
+ },
2145
+ "index": 1
2146
+ },
2147
+ {
2148
+ "param": {
2149
+ "name": "row",
2150
+ "kind": "int",
2151
+ "pawnDefault": null
2152
+ },
2153
+ "index": 2
2154
+ },
2155
+ {
2156
+ "param": {
2157
+ "name": "comment",
2158
+ "kind": "string",
2159
+ "pawnDefault": null
2160
+ },
2161
+ "index": 3
2162
+ }
2163
+ ],
2164
+ "pawnResult": "bool",
2165
+ "declaration": {
2166
+ "name": "cfg_set_row_comment",
2167
+ "params": [
2168
+ {
2169
+ "name": "section",
2170
+ "type": "ConfigSection",
2171
+ "isArray": false,
2172
+ "isRef": false,
2173
+ "isConst": false,
2174
+ "isRest": false
2175
+ },
2176
+ {
2177
+ "name": "key",
2178
+ "type": "any",
2179
+ "isArray": true,
2180
+ "isRef": false,
2181
+ "isConst": true,
2182
+ "isRest": false,
2183
+ "dimensions": 1
2184
+ },
2185
+ {
2186
+ "name": "row",
2187
+ "type": "any",
2188
+ "isArray": false,
2189
+ "isRef": false,
2190
+ "isConst": false,
2191
+ "isRest": false
2192
+ },
2193
+ {
2194
+ "name": "comment",
2195
+ "type": "any",
2196
+ "isArray": true,
2197
+ "isRef": false,
2198
+ "isConst": true,
2199
+ "isRest": false,
2200
+ "dimensions": 1
2201
+ }
2202
+ ],
2203
+ "returnType": "bool",
2204
+ "docs": "Sets the leading \"; ...\" comment of a bracket-block row (e.g. the column hint\nshown above the first data row). Mirrors what a file round-trip preserves, so\nblocks created programmatically can carry the same in-block hint.\n@param section Section handle (cfg_get_section / cfg_create_section).\n@param key Top-level bracket key holding the rows (e.g. \"3x3\", \"CVARS\").\n@param row Zero-based row index inside the block.\n@param comment Single comment line incl. leading ';'; \"\" clears it.\n@return true on success, false if the row/key was not found."
2205
+ }
2206
+ }
2207
+ ],
2208
+ "beside": {
2209
+ "enums": [
2210
+ {
2211
+ "name": "ConfigFile",
2212
+ "members": [
2213
+ {
2214
+ "name": "CFG_FILE_INVALID",
2215
+ "value": -1
2216
+ }
2217
+ ],
2218
+ "doc": "/** A loaded config file. */"
2219
+ },
2220
+ {
2221
+ "name": "ConfigSection",
2222
+ "members": [
2223
+ {
2224
+ "name": "CFG_SECTION_INVALID",
2225
+ "value": -1
2226
+ }
2227
+ ],
2228
+ "doc": "/** A section of a loaded file. */"
2229
+ },
2230
+ {
2231
+ "name": "EntryType",
2232
+ "members": [
2233
+ {
2234
+ "name": "CFG_ENTRY_SIMPLE",
2235
+ "value": 0
2236
+ },
2237
+ {
2238
+ "name": "CFG_ENTRY_BRACKET",
2239
+ "value": 1
2240
+ }
2241
+ ],
2242
+ "doc": "/** What a key is: a `key = value` line or a `key = { ... }` block. */"
2243
+ },
2244
+ {
2245
+ "name": "ContentType",
2246
+ "members": [
2247
+ {
2248
+ "name": "CFG_CONTENT_SIMPLE",
2249
+ "value": 0
2250
+ },
2251
+ {
2252
+ "name": "CFG_CONTENT_STRINGS",
2253
+ "value": 1
2254
+ },
2255
+ {
2256
+ "name": "CFG_CONTENT_ENTRIES",
2257
+ "value": 2
2258
+ }
2259
+ ],
2260
+ "doc": "/** What a key holds: one value, a line of strings, or rows - one value is a line of one string. */"
2261
+ }
2262
+ ],
2263
+ "contract": {
2264
+ "file": "universal_config.inc",
2265
+ "text": "#if defined _universal_config_included\n #endinput\n#endif\n#define _universal_config_included\n\n/**\n * Universal Config System — public API include\n * Version: 1.6.1\n * Author: kukson777\n *\n * A flexible configuration system for parsing, managing and writing INI-like\n * files with support for nested sections, key-value pairs and block structures.\n */\n\n/**\n * Configuration file handle.\n */\nenum ConfigFile {\n CFG_FILE_INVALID = -1\n}\n\n/**\n * Configuration section handle.\n */\nenum ConfigSection {\n CFG_SECTION_INVALID = -1\n}\n\n/**\n * Entry structure type used inside a config section.\n */\nenum EntryType {\n CFG_ENTRY_SIMPLE, // Simple key = value entry\n CFG_ENTRY_BRACKET // Block entry: key { ... }\n}\n\n/**\n * Content type of an entry's value.\n */\nenum ContentType {\n CFG_CONTENT_SIMPLE = 0, // Single value\n CFG_CONTENT_STRINGS, // Array of strings\n CFG_CONTENT_ENTRIES // Array of nested entries\n}\n\n// ============================================================\n// Loading and section lookup\n// ============================================================\n\n/**\n * Loads a configuration file.\n *\n * @param fileName File name (e.g. \"menu.ini\"). If no extension is given,\n * \".ini\" is appended automatically.\n * @return A ConfigFile handle on success, CFG_FILE_INVALID on failure.\n */\nnative ConfigFile:cfg_load_file(const fileName[]);\n\n/**\n * Retrieves a section handle by name from a loaded configuration.\n *\n * @param cfg ConfigFile handle returned by cfg_load_file.\n * @param sectionName Name of the section to look up.\n * @return A ConfigSection handle on success,\n * CFG_SECTION_INVALID if not found.\n */\nnative ConfigSection:cfg_get_section(ConfigFile:cfg, const sectionName[]);\n\n// ============================================================\n// Reading values\n// ============================================================\n\n/**\n * Retrieves a string value from a section.\n *\n * @param section ConfigSection handle.\n * @param key Key name or path (e.g. \"key\" or \"block/subkey\").\n * @param value Output buffer (recommended size: 512).\n * @param len Maximum buffer length.\n * @param index Value index for multi-value keys (default: 0).\n * @return true if the value was found and written, false otherwise.\n */\nnative bool:cfg_get_value(ConfigSection:section, const key[], value[], len, index = 0);\n\n/**\n * Retrieves a string value by its hierarchical path.\n *\n * @param section ConfigSection handle.\n * @param path Path to the value (e.g. \"MAIN/HUD\").\n * @param value Output buffer.\n * @param len Maximum buffer length.\n * @param index Value index (default: 0).\n * @param lineIndex Line index within a block (default: 0).\n * @return true if the value was found, false otherwise.\n */\nnative bool:cfg_get_value_by_path(ConfigSection:section, const path[], value[], len, index = 0, lineIndex = 0);\n\n/**\n * Retrieves an integer value from a section.\n *\n * @param section ConfigSection handle.\n * @param key Key name or path.\n * @param index Value index (default: 0).\n * @return Integer value, or 0 if not found.\n */\nnative cfg_get_int(ConfigSection:section, const key[], index = 0);\n\n/**\n * Retrieves a float value from a section.\n *\n * @param section ConfigSection handle.\n * @param key Key name or path.\n * @param index Value index (default: 0).\n * @return Float value, or 0.0 if not found.\n */\nnative Float:cfg_get_float(ConfigSection:section, const key[], index = 0);\n\n/**\n * Retrieves a boolean value from a section.\n *\n * @param section ConfigSection handle.\n * @param key Key name or path.\n * @param index Value index (default: 0).\n * @return true if the value is non-zero, false if not found or zero.\n */\nnative bool:cfg_get_bool(ConfigSection:section, const key[], index = 0);\n\n/**\n * Returns a dynamic array of string tokens split from a single config line\n * (space-delimited, quote-aware).\n *\n * @param section ConfigSection handle.\n * @param key Key name or path.\n * @param index Line index for multi-value keys (default: 0).\n * @return Array handle with string tokens, or Invalid_Array on failure.\n * The caller is responsible for destroying the array.\n */\nnative Array:cfg_get_value_array(ConfigSection:section, const key[], index = 0);\n\n/**\n * Returns a dynamic array of float values parsed from a single config line.\n *\n * @param section ConfigSection handle.\n * @param key Key name or path.\n * @param index Line index for multi-value keys (default: 0).\n * @return Array handle with Float values, or Invalid_Array on failure.\n * The caller is responsible for destroying the array.\n */\nnative Array:cfg_get_float_array(ConfigSection:section, const key[], index = 0);\n\n/**\n * Returns a dynamic array of tokens split from a value found by hierarchical path.\n *\n * @param section ConfigSection handle.\n * @param path Path to the block (e.g. \"MAIN/HUD\").\n * @param index Part index within the value (default: 0).\n * @param lineIndex Line index within a block (default: 0).\n * @return Array handle with string tokens, or Invalid_Array on failure.\n */\nnative Array:cfg_get_value_array_by_path(ConfigSection:section, const path[], index = 0, lineIndex = 0);\n\n/**\n * Returns a dynamic array containing all top-level key names in a section.\n *\n * @param section ConfigSection handle.\n * @return Array handle with key strings, or Invalid_Array if empty.\n */\nnative Array:cfg_get_top_level_keys(ConfigSection:section);\n\n/**\n * Returns the raw section data as an array.\n * The array contains three sub-arrays: keys, values and pair-index mappings.\n *\n * @param section ConfigSection handle.\n * @return Array handle, or Invalid_Array if the section is empty.\n */\nnative Array:cfg_get_section_data(ConfigSection:section);\n\n/**\n * Returns the number of values associated with a key.\n *\n * @param section ConfigSection handle.\n * @param key Key name or path.\n * @return Value count, or 0 if the key is not found.\n */\nnative cfg_get_array_size(ConfigSection:section, const key[]);\n\n// ============================================================\n// Writing values\n// ============================================================\n\n/**\n * Sets a string value for a key.\n *\n * @param section ConfigSection handle.\n * @param key Key name.\n * @param value String value to set.\n * @param index Value index (default: 0).\n * @return true on success, false otherwise.\n */\nnative bool:cfg_set_value(ConfigSection:section, const key[], const value[], index = 0, lineIndex = 0);\n\n/**\n * Sets an integer value for a key.\n *\n * @param section ConfigSection handle.\n * @param key Key name.\n * @param value Integer value.\n * @param index Value index (default: 0).\n * @return true on success, false otherwise.\n */\nnative bool:cfg_set_int(ConfigSection:section, const key[], value, index = 0);\n\n/**\n * Sets a float value for a key.\n *\n * @param section ConfigSection handle.\n * @param key Key name.\n * @param value Float value.\n * @param index Value index (default: 0).\n * @return true on success, false otherwise.\n */\nnative bool:cfg_set_float(ConfigSection:section, const key[], Float:value, index = 0);\n\n/**\n * Sets a boolean value for a key.\n *\n * @param section ConfigSection handle.\n * @param key Key name.\n * @param value Boolean value.\n * @param index Value index (default: 0).\n * @return true on success, false otherwise.\n */\nnative bool:cfg_set_bool(ConfigSection:section, const key[], bool:value, index = 0);\n\n// ============================================================\n// Key and section management\n// ============================================================\n\n/**\n * Deletes a key from a section.\n *\n * @param section ConfigSection handle.\n * @param key Key to delete.\n * @return true if deleted, false if not found or section is invalid.\n */\nnative bool:cfg_delete_key(ConfigSection:section, const key[]);\n\n/**\n * Checks whether a key exists in a section.\n *\n * @param section ConfigSection handle.\n * @param key Key to check.\n * @return true if the key exists, false otherwise.\n */\nnative bool:cfg_has_key(ConfigSection:section, const key[]);\n\n/**\n * Creates a new in-memory section (not backed by a file).\n *\n * @param sectionName Name of the new section.\n * @return ConfigSection handle on success, CFG_SECTION_INVALID on failure.\n */\nnative ConfigSection:cfg_create_section(ConfigFile:cfg, const sectionName[]);\n\n/**\n * Sets the EntryType for a key in a section.\n *\n * @param section ConfigSection handle.\n * @param key Key name.\n * @param entryType CFG_ENTRY_SIMPLE or CFG_ENTRY_BRACKET.\n * @return true on success, false otherwise.\n */\nnative bool:cfg_set_entry_type(ConfigSection:section, const key[], EntryType:entryType);\n\n/**\n * Sets the ContentType for a key in a section.\n *\n * @param section ConfigSection handle.\n * @param key Key name.\n * @param contentType CFG_CONTENT_SIMPLE, CFG_CONTENT_STRINGS or CFG_CONTENT_ENTRIES.\n * @return true on success, false otherwise.\n */\nnative bool:cfg_set_entry_content_type(ConfigSection:section, const key[], ContentType:contentType);\n\n// ============================================================\n// Saving and writing\n// ============================================================\n\n/**\n * Writes a section to a file.\n * Can be called with 2 arguments (fileName, sectionName) or with 3 arguments\n * (ConfigFile:cfg, fileName, sectionName) when you need to target a specific\n * loaded file handle.\n *\n * @param fileName Destination file name (e.g. \"core.ini\").\n * @param sectionName Section name to write.\n * @return true on success, false otherwise.\n */\nnative bool:cfg_write_file(ConfigFile:cfg, const fileName[], const sectionName[]);\n\n/**\n * Saves a loaded configuration back to its source file.\n *\n * ';' comment lines are round-tripped: a comment block is re-emitted before the\n * element it preceded in the source (section / top-level key / bracket row).\n * Only comments that were present in the loaded file survive — elements created\n * programmatically (e.g. via cfg_set_value) carry no comment unless one already\n * existed on that row. Pass fileName explicitly for multi-section files.\n *\n * @param cfg ConfigFile handle returned by cfg_load_file.\n * @return true on success, false otherwise.\n */\nnative bool:cfg_save_config(ConfigFile:cfg, const fileName[] = \"\");\n\n// ============================================================\n// Utility\n// ============================================================\n\n/**\n * Sets the base directory used when resolving relative config file names.\n *\n * @param dir Path to the directory (e.g. \"addons/amxmodx/configs/jbe\").\n */\nnative cfg_set_base_dir(const dir[]);\n\n/**\n * Returns the total number of sections currently loaded in memory.\n *\n * @return Section count.\n */\nnative cfg_get_sections_count();\n\n/**\n * Returns the name of a loaded section by its sequential index.\n *\n * @param index Zero-based section index (0 .. cfg_get_sections_count() - 1).\n * @param name Output buffer for the section name.\n * @param len Maximum buffer length.\n * @return 1 on success, 0 if the index is out of range.\n */\nnative cfg_get_section_name(index, name[], len);\n\n/**\n * Sets the leading \"; ...\" comment of a bracket-block row (e.g. the column hint\n * shown above the first data row). Mirrors what a file round-trip preserves, so\n * blocks created programmatically can carry the same in-block hint.\n *\n * @param section Section handle (cfg_get_section / cfg_create_section).\n * @param key Top-level bracket key holding the rows (e.g. \"3x3\", \"CVARS\").\n * @param row Zero-based row index inside the block.\n * @param comment Single comment line incl. leading ';'; \"\" clears it.\n * @return true on success, false if the row/key was not found.\n */\nnative bool:cfg_set_row_comment(ConfigSection:section, const key[], row, const comment[]);\n"
2266
+ },
2267
+ "author": "kukson777"
2268
+ },
2269
+ "systems": {
2270
+ "windows": {
2271
+ "file": "prebuilt/windows/config-core.aot",
2272
+ "size": 819588,
2273
+ "sha256": "b84db3a6a55fc7fae1dc76ab4503722809301d3dd2e0c0e6356c038659e54807"
2274
+ },
2275
+ "linux": {
2276
+ "file": "prebuilt/linux/config-core.aot",
2277
+ "size": 828728,
2278
+ "sha256": "66962191416ae4838ec1894dfc48a12939040c9e63805c266819bf52eea704a9"
2279
+ }
2280
+ }
2281
+ }