Raised This Month: $12 Target: $400
 3% 

INI_ParseFile's return value;


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
PartialCloning
Senior Member
Join Date: Dec 2015
Old 06-20-2016 , 05:51   INI_ParseFile's return value;
Reply With Quote #1

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.
PartialCloning is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-20-2016 , 08:40   Re: INI_ParseFile's return value;
Reply With Quote #2

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.
__________________
Arkshine is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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