sourcepawn
sourcepawn copied to clipboard
"Function" type improperly displayed in API docs website
On the SM Scripting API Reference site, the documentation overview on functions that return a "Function" type (such as GetFunctionByName, or GetNativeFunction) are shown that they return a "function" type instead, which is incorrect, as the functions.inc file says it's "Function".
Similarly, in functions that take a "Function" type as a parameter, they also display as "function" in the docs, as it can be seen in Call_StartFunction's documentation overview. Again, this is incorrect.
This should be changed so all "function" types in the docs are changed to "Function", which is the actual type that SourceMod supports, since otherwise it could be misleading to those who check the documentation through the site.
Thanks for your time.
Copying from Discord so it doesn't get lost:
[19:29] asherkin: it is because the docs are generated using type information from the exp (SourcePawn 2) compiler, which uses "function" as the meta type [19:29] asherkin: (and it looks like it is technically unclear, the spec flip-flops a bit on it) [19:32] asherkin: https://mxr.alliedmods.net/sourcemod/source/sourcepawn/exp/compiler/types.cpp#239 I suspect that is the bug