PawnPlus v1.0.0 released!
Miscellaneous
Handles
Pawn API
AMX API
Errors
Strings
Variants
Debug API
Containers
Tasks
Threads
Math API
C API
Miscellaneous
- pp_version, pp_version_string, pp_raise_error, pp_module_name.
- Locale-specific functions can be configured with pp_locale (affects things like str_to_upper and regex).
- AMX subhook variables are no longer exported.
- All natives that take an address inside the AMX check its validity.
Handles
- Several new functions to control the activity of handles.
- Handles are now immutable.
- All GC-objects can provide their lifetime handle.
Pawn API
- pawn_nameof macro can be used to convert a symbol or a tag name to a string (with checking).
- pawn_cast macro (invokes implicit tag conversion operator).
- pawn_try_call_native and pawn_try_call_public (suppress and return errors).
- pawn_native_exists, pawn_native_imported, pawn_public_exists.
AMX API
- amx_tailcall can replace the caller stack frame with the current stack frame.
- amx_handle to control the lifetime of an AMX instance.
- A function can be called in any AMX instance via amx_call_native/amx_call_public.
- Additional support for native and public functions inspection.
- Public and native functions names can be encoded in a two-cell packed string via amx_encode_public_name and amx_encode_native_name for faster calling. Custom values can also be specified.
Errors
- Unhandled C exceptions in natives will be caught and reported.
- Fixed several bugs related to error handling and conflicts with SAMPGDK.
Strings
- Regular expressions (match, extraction, replacement).
- str_format upgraded with new specifiers and syntax for positional arguments.
- All functions now accept packed strings as well.
- ConstAmxString added.
Variants
- var_addr can be used for interop with native functions, similarly to str_addr.
- Empty array variants are now recognized and produced instead of null variants.
Debug API
- A multitude of functions to access the debug information produced by the Pawn compiler (at least -d2 is necessary).
- Allows inspecing all variables and functions. Can be used to set variables (local or global) or to call any Pawn function.
Containers
- Reduced unnecessary copying of objects.
- Functions like list_new_args now store all the tags correctly.
- list_resize, list_find, list_find_last, list_sort.
- Variants and iterators have functions for both single-dimensional and multi-dimensional access to stored arrays.
- Simple iterators: iter_range, iter_repeat, var_iter.
- *_remove_deep and iter_erase_deep (removes the element and releases the object).
- iter_swap, iter_can_reset, iter_can_insert, and iter_can_erase.
Tasks
- task_detach useful for fire-and-forget calls. Creates a new context, so inner asynchronous calls will not pause the caller functions.
Threads
- thread_fix to synchronise the function with the main thread, if called from another. Useful for code called from RCON or console.
Math API
- Functions for signed and unsigned arithmetics (with overflow checks). signed: and unsigned: tags for simple usage.
- math_random, math_random_float, math_round, math_floor, math_ceiling, math_truncate
C API
- A simple mechanism for manipulating PawnPlus from other plugins.
- Supports addons, tags, strings, variants, lists, linked lists, and maps.
- Include ppcommon.h.