Skip to main content

pawn_include

Function pawn_include 

Source
pub fn pawn_include() -> String
Expand description

Pawn .inc source for every native this plugin registers.

The declarations are derived by #[native] from the Rust signatures, so the include cannot drift from the code: rename an argument or change a type and the next build produces the new line.

Types map as follows — f32 to Float:, bool to bool:, AmxString to const name[], Ref<T> to &name keeping T’s tag, and buffers to name[]. A type the macro does not recognize becomes a plain cell, which is what the AMX passes anyway; only the Pawn tag is lost. Natives declared raw come back commented out, since their arity is not in the signature.

Returns an empty include (header only) before the plugin is loaded.