Loop .ini files
#1

Hi guys.
My server was used Y_INI
But now I have too many user files just like Alex.ini 8642.ini [LAS]Gordon.ini ....... over 1000
And problem is incoming:How to read every .ini files?I want to change my save system to SQLite and convert all players files.
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=653119

You only need to have this plugin for the purpose of getting a list of all files.

Use OpenDir on the User directory, and then use DirNext in a loop to get all file names.
From there you can read each file's data like usual and insert it into the database.

There's an example in the plugin release thread too.
Reply
#3

You shouldn't be using Pawn (specificly for SA-MP) to do something like that (reading ~1000 files then insert all the data to a SQLite database).
Reply
#4

Quote:
Originally Posted by DBZdabIt3Bro7
Посмотреть сообщение
You shouldn't be using Pawn (specificly for SA-MP) to do something like that (reading ~1000 files then insert all the data to a SQLite database).
Why? Even if it takes 10 minutes to execute (which it won't), what's the problem? It's solvable in a few minutes with a few lines of code.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)