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

About Link Up the .ini Files to Plugins


Post New Thread Reply   
 
Thread Tools Display Modes
Jess98
Junior Member
Join Date: Apr 2018
Old 11-25-2018 , 07:20   Re: About Link Up the .ini Files to Plugins
Reply With Quote #11

Quote:
Originally Posted by Ghosted View Post
Code:
ReadFile(PathToFile[])
{
new File = fopen(PathToFile, "rt");
new Buffer[128], A[128], B[128];
while (!feof(File))
{
fgets(File, Buffer, charsmax(Buffer));

if (!Buffer[0] || Buffer[0] == '#')
continue;

remove_quotes(Buffer);
strtok(Buffer, A, charsmax(A), B, charsmax(B), '=');
trim(A);
trim(B);

//A=Key
//B=Value
}

fclose(File);
}
/not tested/
/i have not implemented sections, i think that is too much for simple ini files/
Hmm.. why did you set the parameters of "Buffer", "A", "B" as 128 and equalized "Buffer[0]" with "#"?
Jess98 is offline
Jess98
Junior Member
Join Date: Apr 2018
Old 11-25-2018 , 07:25   Re: About Link Up the .ini Files to Plugins
Reply With Quote #12

Quote:
Originally Posted by CrazY. View Post
amx_settings_api
This has some natives that I wonder and seems easy for a newbie, finally there's a helpful thing. Thanks.
Jess98 is offline
Reply



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 07:02.


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