Fixed position jumping for console window

Improved "string_format" script function.
Edited error messages for a few functions.
Updated documents.
This commit is contained in:
NovaRain
2023-06-25 16:30:46 +08:00
parent 0c035a05df
commit 9674c16928
6 changed files with 82 additions and 128 deletions
+5
View File
@@ -391,6 +391,11 @@
#define string_format2(format, a1, a2) sfall_func3("string_format", format, a1, a2)
#define string_format3(format, a1, a2, a3) sfall_func4("string_format", format, a1, a2, a3)
#define string_format4(format, a1, a2, a3, a4) sfall_func5("string_format", format, a1, a2, a3, a4)
#define string_format5(format, a1, a2, a3, a4, a5) sfall_func6("string_format", format, a1, a2, a3, a4, a5)
#define string_format6(format, a1, a2, a3, a4, a5, a6) sfall_func7("string_format", format, a1, a2, a3, a4, a5, a6)
#define string_format7(format, a1, a2, a3, a4, a5, a6, a7) sfall_func8("string_format", format, a1, a2, a3, a4, a5, a6, a7)
#define string_format_MACRO(_0,_1,_2,_3,_4,_5,_6,FUNC,...) FUNC
#define string_format(...) string_format_MACRO(__VA_ARGS__, string_format6, string_format5, string_format4, string_format3, string_format2, string_format1)(__VA_ARGS__)
#define string_tolower(text) sfall_func2("string_to_case", text, 0)
#define string_toupper(text) sfall_func2("string_to_case", text, 1)
#define tile_by_position(x, y) sfall_func2("tile_by_position", x, y)
+5 -4
View File
@@ -339,7 +339,7 @@ FUNCTION REFERENCE
-----
##### `string sprintf(string format, any value)`
- Formats given value using standard syntax of C `printf` function (google "printf" for format details). However it is limited to formatting only 1 value.
- Formats given value using standard syntax of C `printf` function (google "printf" for format details). However, it is limited to formatting only 1 value.
- Can be used to get character by ASCII code (`%c`).
-----
@@ -907,9 +907,10 @@ sfall_funcX metarule functions
----
#### string_format
`string sfall_func3("string_format", string format, any val1, any val2, ...)`
- Formats given value using standard syntax of C `printf` function (google "printf" for format details). However it is limited to formatting up to 4 values
- Formatting is only supported for `%s` and `%d`, and the format string is limited to 1024 characters
`string sfall_func2("string_format", string format, any val1)`
`string sfall_funcX("string_format", string format, any val1, any val2, ...)`
- Formats given values using standard syntax of C `printf` function (google "printf" for format details). However, it is limited to formatting up to 7 values
- The format string is limited to 1024 characters
----
#### objects_in_radius