Re: [INCLUDE] Autoexecconfig read and append beta
On windows the config file is built properly with the additional/missing CVars with appropriate formatting... on Linux, the new CVars and descriptions are all on one long line.
Maybe I don't have the permission on the file set properly, because I see you write "\n" but it just failed to write on my .cfg file... The file attributes for my config file is: 664 |
Re: [INCLUDE] Autoexecconfig read and append beta
I'm sorry if this sounds dumb, but which editor do you use to open/read the file?
Yours sincerely Impact |
Re: [INCLUDE] Autoexecconfig read and append beta
The last time I opened it and edited it was withing FileZilla from a Windows box... so, notepad.
I guess that could be the culprit :( I'll have to open it with gedit again, remove a couple of CVars and let the plugin append the file and let you know how it goes. I've edited the cfg and remove 3 CVars that were set to default anyways, I'll reply once the map has changed. |
Re: [INCLUDE] Autoexecconfig read and append beta
Yep, if you open up the file in a editor like notepad++ it looks fine.
Yours sincerely Impact |
Re: [INCLUDE] Autoexecconfig read and append beta
That's right, because windows uses the \r\n for a new line... sorry about that.
...:: TnT Edit ::... If, in my CreateConVar I have some \n's in there, they are not properly carried over in the config. They show up missing the // characters, like: PHP Code:
PHP Code:
|
Re: [INCLUDE] Autoexecconfig read and append beta
Well, the original autoexecconfig does the same, i don't know if it would be a good thing to alter this behavior.
Yours sincerely Impact |
Re: [INCLUDE] Autoexecconfig read and append beta
The sourcemod autoexecconfig puts //'s on the new line created by the \n in the description
...:: TnT Edit ::... You were probably talking about the \r\n thing, right? Not the //'s thing |
Re: [INCLUDE] Autoexecconfig read and append beta
Yeah, i see, it's this part that does it.
I see if i can implement it tomorrow. Yours sincerely Impact |
Re: [INCLUDE] Autoexecconfig read and append beta
Cool, thanks... I was going to try and update the code on github, but if you're going to do it, that's better, I'll learn by looking :)
|
Re: [INCLUDE] Autoexecconfig read and append beta
Well, feel free to contribute if you want :)
I added support for multiline comments, i used a different approach than the original autoexecconifig function, but it seems to work fine. It was important to me that it doesn't slow things down when you don't use newlines, i think i found a good way between some overhead and easyness. My only concern is that you might run into a "Not enough space on the stack" error if you have dozens of newlines, but we'll see. Here is the commit. Yours sincerely Impact |
All times are GMT -4. The time now is 08:58. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.