A Glua question

Hi all,

I’ve got an addon I’ve been asked to work with that requires individual files for each weapon it interacts with. The weapons that are meant to be used are the whole suite of M9K (other than specialties), so I was looking around for a way to create and write a table into lua files, inside the addons folder instead of making the ~100 or so files and writing 4 pieces of information into each one. So what I’m asking is, are there functions in Glua that can be used to create and write .lua files, not .txt files? Would appreciate a quick response or a more detailed “No, use a macro or something.”


P.S. I don’t need help with getting a table of M9K weapons, I’ve already got code for that working. Also, sorry about the vague title- tried to edit after, didn’t work.

No, use a macro or something.

Default glua functions can only write to garrysmod/data, to write elsewhere you can use https://github.com/wyozi/g-ace-io.