SMCParser < Handle

Last Updated2026-04-10
Created At2014-11-20

An SMCParser is a callback-driven parser for SourceMod configuration files. SMC files are similar to Valve KeyValues format, with two key differences: (1) SMC cannot handle single-item entries (that is, a key with no value). (2) SMC files can have multi-line comment blocks, whereas KeyValues cannot.

Methods4
SymbolDescription
GetErrorStringGets an error string for an SMCError code.
ParseFileParses an SMC file.
ParseStringParses raw UTF-8 text as an SMC file.
SMCParserCreate a new SMC file format parser.
Properties6
SymbolTypeDescription
OnEndSMC_ParseEndSets the callback for receiving SMC_ParseEnd events.
OnEnterSectionSMC_NewSectionSets the callback for receiving SMC_NewSection events.
OnKeyValueSMC_KeyValueSets the callback for receiving SMC_KeyValue events.
OnLeaveSectionSMC_EndSectionSets the callback for receiving SMC_EndSection events.
OnRawLineSMC_RawLineSets the callback for receiving SMC_RawLine events.
OnStartSMC_ParseStartSets the callback for receiving SMC_ParseStart events.