Open afwn90cj93201nixr2e1re opened 4 years ago
Then if we need something we can just call INI_ParserDestroy() which gonna destroy parser after reading needed section.
@Arkshine any ideas?
if (!equali(section, g_Mapname)){
return true;
}
and your problem fixed 🤔
Я же говорю, тогда в ключи будут приходить значения.
Ok. i got it. I think it should be great to add "section" paremeter to OnKeyValue
handler. Then you can just parse everything here.
public bool:OnKeyValue(INIParser:handle, const section[], const key[], const value[], bool:invalid_tokens, bool:equal_token, bool:quotes, curtok, any:data)
I can already do it, just by simple skipping.
OnNewSection(...)if(equali...)neededSection = true;
OnNewKeyValue(...)if(!neededSection)return true; else{...}return true;
But that's not nice for perf.
Or instead of true/false we can add 3 return values: 0 - break parsing(like false now) 1 - continue parsing(like true) 2 - skip section and continue
Yep, like PLUGIN_* stuff.
Description
When OnNewSection return false parser should skip only section(not handler), till new one.
Problematic Code (or Steps to Reproduce)