MCPcopy Create free account
hub / github.com/alliedmodders/sourcemod / ReadSMC_NewSection

Method ReadSMC_NewSection

extensions/structs/extension.cpp:121–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119}
120
121SourceMod::SMCResult Structs::ReadSMC_NewSection( const SMCStates *states, const char *name )
122{
123 if (!m_bInStruct)
124 {
125 m_currentStruct = new StructInfo();
126 UTIL_Format(m_currentStruct->name, sizeof(m_currentStruct->name), "%s", name);
127 m_bInStruct = true;
128
129 return SMCResult_Continue;
130 }
131
132 if (!m_bInMember)
133 {
134 m_bInMember = true;
135 m_currentMember = new MemberInfo();
136 UTIL_Format(m_currentMember->name, sizeof(m_currentMember->name), "%s", name);
137
138 return SMCResult_Continue;
139 }
140
141 g_pSM->LogMessage(myself, "Cannot nest within a member: line: %i col: %i", states->line, states->col);
142
143 return SMCResult_HaltFail;
144}
145
146SourceMod::SMCResult Structs::ReadSMC_KeyValue( const SMCStates *states, const char *key, const char *value )
147{

Callers

nothing calls this directly

Calls 2

UTIL_FormatFunction · 0.70
LogMessageMethod · 0.45

Tested by

no test coverage detected