Raised This Month: $115 Target: $400
 28% 

INI File Reader/Writer AMXX 1.9


Post New Thread Reply   
 
Thread Tools Display Modes
E1_531G
Senior Member
Join Date: Dec 2017
Old 05-28-2019 , 01:11   Re: INI File Reader/Writer AMXX 1.9
Reply With Quote #11

Hello again.
I think this API misses one very good thing: natives for keeping file open for some time, for multiple-writings/readings.
You can see similar feature in SQLVault: https://forums.alliedmods.net/showthread.php?t=146849

For example:
1. I know i have to read 3 settings keys from the file
2. I use: ini_init( ... )
3. I use 3 times: ini_read_int( ... )
4. I use ini_end( ... )

How it works?
ini_init() creates a global temporary file pointer.
if ini_read_int or others natives see what that global pointer is available they use it instead of opening and closing the file again and again.
ini_end() kills that global pointer.

Maybe it is not a big deal speaking about performance, but think a bit, when you use an API like this one you almost always know which keys you have to read and how many they are.
__________________
My English is A0

Last edited by E1_531G; 05-28-2019 at 01:13.
E1_531G is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 05-28-2019 , 14:32   Re: INI File Reader/Writer AMXX 1.9
Reply With Quote #12

Not a bad idea, I'll update it when I've time.
__________________
Accepting private $$$ plugins requests.

@Steam: crazy770
@Discord: CrazY.#5317

Website | Channel

CrazY. 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 15:45.


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