Register File?

Hello, I want to make a user file. Something like a bank system
Ex:
User: Nicksf13
SteamID: XXXXXXXXXXX
Credits: 1000
VIP: 4

There’s anyway to do that? I know C++ Has the io.open and C has fopen(). Also garry’s mod has file.read, but I didn’t see anyway to write a structured file in gmod.Can anyone help me?

There’s the file library which has pretty much everything you’d need. If you wanted a format you could use string.format to easily fill it in, something like this:
[lua]local format = [[User: %s
SteamID: %s
Credits: %i]]

file.Write( “register/”…ply:SteamID()…".txt", string.format( format, ply:Nick(), ply:SteamID(), ply:GetPoints() ) )[/lua]
However, if you’re using this as a form of storing information about players to be collected by the server, not by you, I suggest looking into more efficient methods, such as serializing tables using util.TableToJSON instead. Even better, learn yourself SQL and use the in-built SQLite database with the sql library

To read saved data easier in code, util.tabletojson and util.jsonfromtable

Harder to read as a human opening the file in a text editor though.

I think I’ll try with SQL, but I didn’t found any SQL tutorial, do You have one? Some simple SQL tutorial explaning which function is to open a section in sql, which function with user, pw, hostname?