Fastest Method of doing reading files
#1

I have a script that saves a player's notes in a new file called 'notes.ini'. I load the Files everytime the player types /notes to view them. There are 10 slots, each notes containing 20 arrays for the text.

Question is that loading notes.ini everytime a players types /notes can be slow. What can be the best way to work my code? If I make a new variable such as new PlayerNotes[MAX_PLAYERS][10][20] and only load notes.ini only once when a player spawns and save it in the variable I stated above. Will this be the best way to go for? Or do I have any other options aswell?

2nd Question:
I have 2 more player files like notes.ini for every player that requires the same amount of arrays and variables and requires to get called everytime a user tries to access it. Will this cause too much lag?

Thank you.
Reply
#2

Writing to ini files should only be done for saving and loading.
Reply
#3

Can you atleast be a little brief?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)