VFormat Function

Formats a string according to the SourceMod format rules (see documentation).

int VFormat(char[] buffer, int maxlength, const char[] format, int varpos)

Parameters

char[] buffer

Destination string buffer.

int maxlength

Maximum length of output string buffer.

const char[] format

Formatting rules.

int varpos

Argument number which contains the '...' symbol. Note: Arguments start at 1.

Return Value

Number of bytes written.

Errors

Invalid argument index.

Notes

This is the same as Format(), except it grabs parameters from a parent parameter stack, rather than a local. This is useful for implementing your own variable argument functions.