Raised This Month: $ Target: $400
 0% 

Error Parsing Admin CFGs


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
NGWMark
Member
Join Date: Oct 2012
Location: Missouri, United States
Old 05-17-2013 , 20:53   Error Parsing Admin CFGs
Reply With Quote #1

I keep getting errors in the console about my admin CFG files having unknown tokens. I've triple checked each file and they all seem to be formatted correctly. I know I have the spacing done a bit weird, probably due to my CSS background, but to me it's readable, and it should still parse correctly as far as I can see. What does it mean by unknown tokens and what am I doing wrong? Thanks!

Code:
Admins {

	"Mark" {
	"auth"			"steam"
	"identity"		"STEAM_0:1:44496069"
	"group"			"Owners" }

	"Buck" {
	"auth"			"steam"
	"identity"		"STEAM_0:1:57051660"
	"group"			"Officers" }

	"pl2p" {
	"auth"			"steam"
	"identity"		"STEAM_0:1:43495879"
	"group"			"Officers" }

	"Serious Comedian" {
	"auth"			"steam"
	"identity"		"STEAM_0:0:41110098"
	"group"			"Donors"
	"group"			"Server Regulars"
	"group"			"Custom Characters" }}
Code:
Groups {

	"Owners" {
	"immunity"		"3"
	"flags"			"z" }

	"Officers" {
	"immunity"		"2"
	"Overrides" {
	"sm_admin"		"allow"
	"sm_kick"		"allow"
	"sm_silence"		"allow"
	"sm_unsilence"		"allow" }}
	
	"Donors" {
	"immunity"		"1"
	"Overrides" {
	"sm_admin"		"allow" }}}
Code:
Overrides {
	"betherobot"			"z" }
Code:
L 05/17/2013 - 16:49:25: [admin-flatfile.smx] Error(s) detected parsing addons/sourcemod/configs/admin_overrides.cfg
L 05/17/2013 - 16:49:25: [admin-flatfile.smx] (line 1) Section declared with unknown tokens
L 05/17/2013 - 16:49:25: [admin-flatfile.smx] Error(s) detected parsing addons/sourcemod/configs/admin_groups.cfg
L 05/17/2013 - 16:49:25: [admin-flatfile.smx] (line 4) Section declared with unknown tokens
L 05/17/2013 - 16:49:25: [admin-flatfile.smx] Error(s) detected parsing addons/sourcemod/configs/admin_groups.cfg
L 05/17/2013 - 16:49:25: [admin-flatfile.smx] (line 4) Section declared with unknown tokens
L 05/17/2013 - 16:49:25: [admin-flatfile.smx] Error(s) detected parsing addons/sourcemod/configs/admins.cfg
L 05/17/2013 - 16:49:25: [admin-flatfile.smx] (line 5) Section declared with unknown tokens
__________________


NGWMark is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 05-17-2013 , 21:31   Re: Error Parsing Admin CFGs
Reply With Quote #2

Code:
Admins
{

	"Mark"
	{
		"auth"			"steam"
		"identity"		"STEAM_0:1:44496069"
		"group"			"Owners"
	}

	"Buck"
	{
		"auth"			"steam"
		"identity"		"STEAM_0:1:57051660"
		"group"			"Officers"
	}

	"pl2p"
	{
		"auth"			"steam"
		"identity"		"STEAM_0:1:43495879"
		"group"			"Officers"
	}

	"Serious Comedian"
	{
		"auth"			"steam"
		"identity"		"STEAM_0:0:41110098"
		"group"			"Donors"
		"group"			"Server Regulars"
		"group"			"Custom Characters"
	}
}
Code:
Groups
{

	"Owners"
	{
		"immunity"		"3"
		"flags"			"z"
	}

	"Officers"
	{
		"immunity"		"2"
		"Overrides"
		{
			"sm_admin"		"allow"
			"sm_kick"		"allow"
			"sm_silence"		"allow"
			"sm_unsilence"		"allow"
		}
	}
	
	"Donors"
	{
		"immunity"		"1"
		"Overrides"
		{
			"sm_admin"		"allow"
		}
	}
}
Your formatting is off, it should match the examples
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
NGWMark
Member
Join Date: Oct 2012
Location: Missouri, United States
Old 05-17-2013 , 21:34   Re: Error Parsing Admin CFGs
Reply With Quote #3

Thanks! I'm really interested to know what I was doing wrong though, from what I can see the only difference between our code is the spacing, and I didn't think SourceMod was whitespace sensitive?
Quote:
Originally Posted by YamiKaitou View Post
Code:
Admins
{

	"Mark"
	{
		"auth"			"steam"
		"identity"		"STEAM_0:1:44496069"
		"group"			"Owners"
	}

	"Buck"
	{
		"auth"			"steam"
		"identity"		"STEAM_0:1:57051660"
		"group"			"Officers"
	}

	"pl2p"
	{
		"auth"			"steam"
		"identity"		"STEAM_0:1:43495879"
		"group"			"Officers"
	}

	"Serious Comedian"
	{
		"auth"			"steam"
		"identity"		"STEAM_0:0:41110098"
		"group"			"Donors"
		"group"			"Server Regulars"
		"group"			"Custom Characters"
	}
}
Code:
Groups
{

	"Owners"
	{
		"immunity"		"3"
		"flags"			"z"
	}

	"Officers"
	{
		"immunity"		"2"
		"Overrides"
		{
			"sm_admin"		"allow"
			"sm_kick"		"allow"
			"sm_silence"		"allow"
			"sm_unsilence"		"allow"
		}
	}
	
	"Donors"
	{
		"immunity"		"1"
		"Overrides"
		{
			"sm_admin"		"allow"
		}
	}
}
Your formatting is off, it should match the examples
__________________


NGWMark is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 05-17-2013 , 21:39   Re: Error Parsing Admin CFGs
Reply With Quote #4

These are KeyValue files, not plugins. My understanding is that Valve's KeyValue system is whitespace sensitive while SourcePawn is not whitespace sensitive.
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
NGWMark
Member
Join Date: Oct 2012
Location: Missouri, United States
Old 05-17-2013 , 21:44   Re: Error Parsing Admin CFGs
Reply With Quote #5

That's too bad, for me the original version was a lot more readable. But thanks for your help!
Quote:
Originally Posted by YamiKaitou View Post
These are KeyValue files, not plugins. My understanding is that Valve's KeyValue system is whitespace sensitive while SourcePawn is not whitespace sensitive.
__________________


NGWMark is offline
NGWMark
Member
Join Date: Oct 2012
Location: Missouri, United States
Old 05-17-2013 , 21:48   Re: Error Parsing Admin CFGs
Reply With Quote #6

It looks like the parser doesn't necessarily care about indentation, as long as each bracket is on its own line.
__________________


NGWMark is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 05-18-2013 , 18:57   Re: Error Parsing Admin CFGs
Reply With Quote #7

The parser is line-based, not character-based.
__________________
asherkin 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 04:14.


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