Quote:
Originally Posted by Y_Less
This could do with more documentation on the rest of the amx_ functions. I came here the other day to look up some things and they weren't documented.
|
Could you share which particular amx functions that you believe should be added to the guide? I know i left out quite a bit of AMX functions, but there were a couple of reasons for doing so. While i want this guide to document everything, i also want to keep it compact as i can (reasonably). Every time i add an amx function i also have to create an example for it, if i didnt it just wouldnt be fair to the readers. The functions you see listed are only the ones i've used in this guide. Another reason i left out a few was simply because some of them dont apply to plugin development, so there's no point in listing those.
Tell me which ones you think should be added and i'll write the examples and add them to the guide (as long as they pertain to plugins - like amx_FindPublicVar).
Quote:
Originally Posted by Y_Less
I'm not sure why you mention natives there at all.
Also, it would be helpful to explain a little more about "callbacks". We call PUBLIC functions "callbacks", the PAWN VM calls NATIVE functions "callbacks" and this can lead to some confusion if you don't remember that it's all point-of-view specific. The VM executes PAWN code and they some times "call back" in to the VM through natives. PAWN code executes functions, including natives, and these sometimes "call back" in to the PAWN script through publics.
|
I didnt write those function references, i simply copied them over from the implementers guide and made them "pretty". I didnt want to spend so much time reinventing the wheel, especially when i probably wouldnt be able to beat what already existed. This would be my best attempt at documenting this function (keep in mind the index parameter would already be explained):
Code:
amx_Exec accesses an entry point (public function) in the script based off of the specified "index" parameter value. Any native function that the script uses will be sent to the amx_Callback function assuming that it wasnt overrided with amx_SetCallback. In this "callback" function any return value that is non-zero will result in the halting of execution of amx_Exec.
Im not sure if thats a better explanation, but its the best i can do with the little information i have read on the function. I havent really read all the implementers guide simply because my primary interest has been with plugins, not implementing/setting up the abstract machine. This of courses means my understanding of certain functions and bits of the abstract machine (ie: op codes) arent as high as they COULD be.
There may be a time when i completely rewrite the amx function documentation in my own words, but im also trying to better myself as a programmer, so im not sure when this might be.