AMXx 1.60 Scripting Changes
Upcoming AMX Mod X 1.60 will have a few scripting changes which will greatly improve the power and flexibility of plugins. The Dark Ages of Small are diminishing as AMX Mod X introduces primitive exception handling, control over the module/native system, and client-cvar querying.
Error Filters Plugins can now trap errors that occur, blocking the debugger/RTE message, and then decide how to handle it. Furthermore, they have access to their own stack traces (which include function names, line numbers, and file names). An example of this is here: Code:
Furthermore, debug traces are now much more informative. Especially with array bounds, error messages are extremely detailed: Code:
] amx_test Native/Module Filtering System With AMX Mod X 1.60, you have total control over the auto-module require system. The biggest usage is that you can make your plugins load even if they use natives or modules that don't exist -- or you can override the errors that occur if they don't. The two best applications of this system are: 1. You have a plugin that supports different modules doing the same thing. For example, you have a #define between CSTRIKE/DOD or VAULT/NVAULT/MYSQL. You can eliminate the need for the #defines by using native+module filters. Your plugin will load even when a certain module doesn't exist and the natives aren't there. Or, a module could add specific enhancements that aren't required. The filtering system makes it optional without two compiled versions. 2. You have a plugin and users somehow don't understand the "check your modules.ini" message. This allows you to override that message with something somehow more informative. This system is best seen in PLMENU. In AMX Mod X 1.55, PLMENU used #define CSTRIKE to switch in between mod versions. In 1.60, it uses the filtering system: Code:
Client CVAR Querying PM OnoTo has added a client cvar querying system to AMX Mod X! This means plugins can now find out the exact values of a cvar on a client. For a good example of this, you can see PM's excellent CVAR Rules plugin (unreleased) that lets you define rules for the boundaries of client cvars. An example: Code:
Check out the funcwiki entry for query_client_cvar for more info. Also two new natives have been added to string.inc: float_to_str and str_to_float. If you have any questions, feel free to post here! |
i gave him the idea ladies and gentlmen :D
|
;] no, #2 is a direct consequence of [gh]ferret asking if plugins could use modules and still load without them. The rest is random things we thought were good ideas while fixing up 1.55
|
keep up the good work ..!
|
we need a super duper nvault :? where are you Suzuka? :P
|
Quote:
|
awsome news guys!
can't await to have 1.60 on the desk as there's already a bunch of fixes (like the ones in DoDx module) that a lot of serveradmins need (and so stop complaining about my plugins not working correctly :evil: ). keep up the great work! 8) |
Good job, I wanted those last 2 natives mentioned. :D
|
Will 1.60 be a stable or beta release? (Since there's no other real topics about it)
|
Yes, it will be stable or beta.
|
All times are GMT -4. The time now is 08:39. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.