Thread: [Solved] Need Code For CFG FILE
View Single Post
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-24-2022 , 21:55   Re: Need Code For CFG FILE
Reply With Quote #35

If I thought he wasn't capable of doing this himself, I would have just done it (he said he wanted to learn).

Why did you add the "_amxx" to the cfg file? That will prevent this from working at all. Also, you should remove the break because if the cvar is defined twice or more in the config file then only the last one will actually be accurate.

The other thing is that just because a file exists doesn't mean it will be accessible. So, you don't need to see if it exists, just try to open if and if you don't get a valid file pointer then you can't execute any of the file reading code (this method is shown by the code I've referenced).
__________________

Last edited by fysiks; 07-24-2022 at 21:59.
fysiks is online now