(If you want to cut to the chase just scroll down to HERE’S THE PROBLEM)
I am creating a pseudo “Nazi Zombies Mystery Box” Vending Machine that offers you choices to narrow down specific categories of weapons to randomly give you.
This addon is being set so that it creates a folder in Garrysmod/garrysmod/data: and populates the folder with a text file for each table/category of weapons you can choose from.
(It only WRITES these files if it checks and finds that they do not exist, other than this, they are never again altered by the code: I want this addon to be configurable so people can add whatever weapons they please to it)
This is all working fine up until we get to this function:
And here is the one file I have made for testing.
HERE’S THE PROBLEM
For a reason I can not figure out for the life of me, the machine is only able to create the last weapon of the table/file, even though the Classnames are correct.
I have tried everything I can think of, and I imagine I am unable to figure it out due to my inexperience here.
I am almost sure what I am doing wrong is so painfully simple and obvious to everybody else but me.
I am stumped.
Thank you in advance for anybody who takes a look at this.