Raised This Month: $51 Target: $400
 12% 

[EXTENSION] Config (1.0.2)


Post New Thread Reply   
 
Thread Tools Display Modes
Thraka
AlliedModders Donor
Join Date: Aug 2005
Old 03-04-2010 , 16:41   Re: [EXTENSION] Config (1.0.1)
Reply With Quote #21

I have a bug. If the .conf file has a SPACE character at the end of it, it fails to load. If the last thing is a blank line or the terminator character (;) there is no problem.

Last edited by Thraka; 03-05-2010 at 00:50.
Thraka is offline
sfPlayer
Senior Member
Join Date: Dec 2007
Location: Germany
Old 03-05-2010 , 04:43   Re: [EXTENSION] Config (1.0.1)
Reply With Quote #22

How did you manage to create such a file? The only way I could do so is using a hex editor and removing the \n@eof myself.
sfPlayer is offline
Thraka
AlliedModders Donor
Join Date: Aug 2005
Old 03-05-2010 , 09:38   Re: [EXTENSION] Config (1.0.1)
Reply With Quote #23

What? No, the .conf text file that you create in notepad that has all the

Setting:
{
};

items.
Thraka is offline
Chanz
Veteran Member
Join Date: Aug 2008
Location: Germany - Stuttgart
Old 03-12-2010 , 16:25   Re: [EXTENSION] Config (1.0.1)
Reply With Quote #24

Hey sfPlayer I wrote a plugin that uses your extension. It runs without any problems on our servers, but MarshalZCC got some problems:

https://forums.alliedmods.net/showth...27#post1115527

He said that every line in the config file produces an error:
Code:
L 03/09/2010 - 23:45:40: [SM] Plugin encountered error 25: Call was aborted
L 03/09/2010 - 23:45:40: [SM] Native "SetFailState" reported: Can't read config file addons/sourcemod/configs/healthdisplay.conf: syntax error @ line 8
L 03/09/2010 - 23:45:40: [SM] Displaying call stack trace for plugin "healthdisplay.smx":
L 03/09/2010 - 23:45:40: [SM]   [0]  Line 262, C:\Users\Daniel\Documents\MFHSVN\sourcemodplugins\healthdisplay\addons\sourcemod\scripting\healthdisplay.sp::OnMapStart()
L 03/09/2010 - 23:45:40: [SM] Plugin encountered error 25: Call was aborted
L 03/09/2010 - 23:45:40: [SM] Native "SetFailState" reported: Can't read config file addons/sourcemod/configs/healthdisplay.conf: syntax error @ line 8
L 03/09/2010 - 23:45:40: [SM] Displaying call stack trace for plugin "custom/healthdisplay.smx":
L 03/09/2010 - 23:45:40: [SM]   [0]  Line 262, healthdisplay.sp::OnMapStart()
Since I double checked the config files (I put into the zip & post) and I can't find any error I need your help.

Could you try to install my plugin on one of your servers and try to load it?

When it doesn't work could you point out where I made a mistake in the syntax of the config file?

Thank you.
__________________
[ SourceModPlugins.org ][ My Plugins ]

Thank you for donations: [ Paypal ]

Video Tutorial (German): [ Gameserver & SourceMod Plugins mit HLSW verwalten ]
Chanz is offline
sfPlayer
Senior Member
Join Date: Dec 2007
Location: Germany
Old 03-12-2010 , 16:37   Re: [EXTENSION] Config (1.0.1)
Reply With Quote #25

I need the configuration file he's using to have a look at it. There is an issue with missing \n at eof, I tried to contact the author of libconfig about it.
sfPlayer is offline
Chanz
Veteran Member
Join Date: Aug 2008
Location: Germany - Stuttgart
Old 03-12-2010 , 18:02   Re: [EXTENSION] Config (1.0.1)
Reply With Quote #26

He used the untuched config file in my plugin zip file.
https://forums.alliedmods.net/attach...4&d=1268191190
__________________
[ SourceModPlugins.org ][ My Plugins ]

Thank you for donations: [ Paypal ]

Video Tutorial (German): [ Gameserver & SourceMod Plugins mit HLSW verwalten ]
Chanz is offline
sfPlayer
Senior Member
Join Date: Dec 2007
Location: Germany
Old 03-12-2010 , 19:12   Re: [EXTENSION] Config (1.0.1)
Reply With Quote #27

My debugging shows that libconfig currently doesn't support files with Windows line endings (\r\n, no \n at eof).

I try to contact the author, if he doesn't respond/fix it within a week or so, I'll fix it myself by implementing line ending conversation in my extension code.

I attached a converted version of your config file here (added .txt due to forums failure). If you use an advanced editor like Notepad++ you can create and convert such files yourself until the fix is out.
Attached Files
File Type: txt healthdisplay.conf.txt (2.4 KB, 210 views)
sfPlayer is offline
Chanz
Veteran Member
Join Date: Aug 2008
Location: Germany - Stuttgart
Old 03-12-2010 , 19:17   Re: [EXTENSION] Config (1.0.1)
Reply With Quote #28

ok thank you very much.
__________________
[ SourceModPlugins.org ][ My Plugins ]

Thank you for donations: [ Paypal ]

Video Tutorial (German): [ Gameserver & SourceMod Plugins mit HLSW verwalten ]
Chanz is offline
sfPlayer
Senior Member
Join Date: Dec 2007
Location: Germany
Old 03-14-2010 , 22:10   Re: [EXTENSION] Config (1.0.1)
Reply With Quote #29

I've implemented the workaround for Windows line endings. Please test it.

Thanks @ Thraka and Chanz for reporting the issue.

Last edited by psychonic; 03-05-2011 at 23:40. Reason: removed attachments due to source code not being available
sfPlayer is offline
Chanz
Veteran Member
Join Date: Aug 2008
Location: Germany - Stuttgart
Old 03-15-2010 , 10:25   Re: [EXTENSION] Config (1.0.1)
Reply With Quote #30

I reproduced the error with Config 1.0.1 then replaced it with Config 1.0.2 and it works.
Thank you very much.
__________________
[ SourceModPlugins.org ][ My Plugins ]

Thank you for donations: [ Paypal ]

Video Tutorial (German): [ Gameserver & SourceMod Plugins mit HLSW verwalten ]
Chanz is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:56.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode