AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   General (https://forums.alliedmods.net/forumdisplay.php?f=7)
-   -   INI_ParseFile's return value; (https://forums.alliedmods.net/showthread.php?t=284155)

PartialCloning 06-20-2016 05:51

INI_ParseFile's return value;
 
INI_ParseFile returns false if you end the parsing by returning false in the newsection function. I'm guessing that's the intended behavior but it should return true if it's able to find and parse a part of the file.

This can be tested by adding the following at the top of the "ReadCSDM_NewSection" in the test file:

PHP Code:

if(equal(section"secondary"))
       return 
false

It will print "Fatal parse error", even after it parsed a part of the file.

Arkshine 06-20-2016 08:40

Re: INI_ParseFile's return value;
 
I guess it would be useful to be able to do the same as SMC parsing. Returning some similar SMCResult status to decide whether parsing should just stop or stop and fail.


All times are GMT -4. The time now is 10:11.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.