Raised This Month: $ Target: $400
 0% 

[Req] Plugins.ini check & rewrite


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 07-24-2016 , 00:20   Re: [Req] Plugins.ini check & rewrite
Reply With Quote #7

Quote:
Originally Posted by Adryyy View Post
And..What's so important? too many pointless questions
He is saying, we are saying, we are trying the get, ...

The XY problem is asking about your attempted solution rather than your actual problem.
That is, you are trying to solve problem X , and you think solution Y would work, but instead of
asking about X when you run into trouble, you ask about Y.
What is the XY problem? - Meta Stack Exchange

So, we need to know what problem you are trying to solve, not how your are trying to solve.
Because mostly you could pick up the wrong solution, then we would just to waist time, rather than
solve your actual problem.

However, you want to replace the first line of your 'plugins.ini' file?
No problem.
First, you will need to read/load the whole file into the computers memory.
Second, you will modify your first line.
Third, you will delete your current 'plugins.ini' file.
Forth, your will write the contents of the computer memory, which contains the modified file you just read/load, on the file 'plugins.ini'.

Mostly, a better algorithm would to just read the first line, modify it, then write it to a temp file, and then keep reading from one file and writing it on the other until it finishes.
After that, just delete your 'plugins.ini' file and rename the 'temp_file.ini' to 'plugins.ini'.

Easy easy, but expensive operation. Then what is the problem you are trying to solve?
Using Files to write data/values(old and new file commands) (use the new functions a.k.a faster).
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective

Last edited by addons_zz; 07-24-2016 at 00:29. Reason: update
addons_zz is offline
 



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 03:05.


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