ULX

Author Topic: UTeam - Set teams based on usergroup.  (Read 316209 times)

0 Members and 2 Guests are viewing this topic.

Offline mrm

  • Newbie
  • *
  • Posts: 10
  • Karma: 0
Teams help
« Reply #210 on: October 03, 2009, 12:47:24 PM »
Hello, I have uteam installed on my server, and for the most part it works well, but it doesnt want to work with some groups. Any help would be greatly appreciated
Code: [Select]
"Out"
{
"teams"
{
"1"
{
"name" "UberAdmin"
"group" "uberadmin"
"armor" "1000"
"hp" "1000"
"color"
{
"a" "255"
"B" "51"
"g" "255"
"r" "102"
}
"plytable"
{
"1" "SprintSpeed:1000"
"2" "WalkSpeed:500"
}
}
"2"
{
"name" "SuperAdmin"
"group" "superadmin"
"armor" "500"
"hp" "500"
"color"
{
"a" "255"
"B" "0"
"g" "153"
"r" "255"
}
}
"3"
{
"name" "Admins"
"group" "admin"
"armor" "500"
"hp" "500"
"color"
{
"a" "255"
"B" "255"
"g" "153"
"r" "51"
}
}

                "4"
{
"name" "Moderators"
"group" "moderator"
"armor" "200"
"hp" "200"
"color"
{
"a" "255"
"B" "0"
"g" "0"
"r" "153"
}
}

               
                "5"
{
"name" "Members"
"group" "member"
"armor" "150"
"hp" "150"
"color"
{
"a" "255"
"B" "255"
"g" "153"
"r" "51"
}
}
               
                "6"
{
"name" "Goldmembers"
"group" "goldmember"
"armor" "500"
"hp" "500"
"color"
{
"a" "255"
"B" "51"
"g" "255"
"r" "255"
}
}
                "7"
{
"name" "Operators"
"group" "operator"
"armor" "200"
"hp" "200"
"color"
{
"a" "255"
"B" "0"
"g" "200"
"r" "255"
}
}
"8"
{
"name" "Players"
"group" "user"
"color"
{
"a" "255"
"B" "204"
"g" "204"
"r" "204"
}

}
}
"gamemodes"
{
"1" "Sandbox"
"2" "SpaceBuild"
}
}

It all works except for the goldmember group, which is the same blue as members for some reason.

Edit: I believe this belongs in the off topic section, sorry.

[Edit-JamminR]Merged thread into UTeam release thread
« Last Edit: October 03, 2009, 04:51:59 PM by JamminR »

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: UTeam - Set teams based on usergroup.
« Reply #211 on: October 03, 2009, 04:56:13 PM »
mrm,
Try the attached file as your UTeam.txt (you'll need to change its name as saving it of course)
Restart your server after saving it.
Let me know if it works, and I'll explain why.
If not, my theory is wrong.

"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline mrm

  • Newbie
  • *
  • Posts: 10
  • Karma: 0
Re: UTeam - Set teams based on usergroup.
« Reply #212 on: October 04, 2009, 10:48:12 AM »
Thankyou for your work on trying to fix my problem. Unfortunately, goldmembers are still blue. Hopefully you have another theory?

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: UTeam - Set teams based on usergroup.
« Reply #213 on: October 04, 2009, 11:10:12 AM »
Sure the group name matches?
Does your groups.txt file somehow have a capital letter instead of all lowercase? Goldmember instead of goldmember?
Lua is case sensitive, though our console commands always turn group entry into lowercase, we often see manual edits of the groups.txt file done in incorrect case.
Is it plural? goldmembers instead of goldmember?
Your Uteam file doesn't use plural.

My original theory involved whitespace issues. We've seen Glua's table and file.read commands have trouble with them in the past.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline mrm

  • Newbie
  • *
  • Posts: 10
  • Karma: 0
Re: UTeam - Set teams based on usergroup.
« Reply #214 on: October 04, 2009, 07:03:17 PM »
Thats the first thing I checked, and its all perfect. I honestly don't know what It could be.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: UTeam - Set teams based on usergroup.
« Reply #215 on: October 04, 2009, 07:44:25 PM »
Please attach your gmod/data/ULib/groups.txt, and go ahead and run/attach a ulx debuginfo while a member of the goldmember's group is connected.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline mrm

  • Newbie
  • *
  • Posts: 10
  • Karma: 0
Re: UTeam - Set teams based on usergroup.
« Reply #216 on: October 04, 2009, 07:53:19 PM »
Here is the short version of the debug:

Code: [Select]
Results:
KeyValues Error: RecursiveLoadFromBuffer: got empty keyname in file In
Users, admin,
KeyValues Error: RecursiveLoadFromBuffer: got empty keyname in file In
Users, (*admin*),
KeyValues Error: LoadFromBuffer: missing { in file In
(*Users*), (*admin*),
Debug information written to garrysmod/data/ulx/debugdump.txt on server.

and groups is the exact same one you gave me. If you need the WHOLE debug, tell me and i will attach it. Mostly just useless info though.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: UTeam - Set teams based on usergroup.
« Reply #217 on: October 04, 2009, 08:16:25 PM »
groups.txt is not the same as uteam.txt
Groups are not the same as teams.
It seems your users.txt file is corrupt; most likely the gmod default /settings/users.txt
Check for missing brackets and or quotes.
Also, check server startup for errors regarding ULib startup.
If the users.txt file in settings is a bit off, ULib would probably let you know.

« Last Edit: October 04, 2009, 08:18:40 PM by JamminR »
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline mrm

  • Newbie
  • *
  • Posts: 10
  • Karma: 0
Re: UTeam - Set teams based on usergroup.
« Reply #218 on: October 04, 2009, 08:21:44 PM »
sorry misread lol. I know groups n teams aren't the same. I shall check all those things now

Btw, I don't use the default users.txt for anything.

Attached groups.txt - divided it into sections with //title for ease of scanning - don't have those in the actual server one.

« Last Edit: October 04, 2009, 08:31:39 PM by mrm »

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: UTeam - Set teams based on usergroup.
« Reply #219 on: October 05, 2009, 03:23:15 PM »
Might be due to inheritance.
Your goldmember inherits member, which then inherits user.
Try having member inherit_from no group { }
(Users is inherited by all groups by default - no need to specify it)

I have other questions.  Though I don't normally do this, to keep from filling this thread with what I don't believe to be a UTeam issue, I'm going to email you. If resolution is found and not to be UTeam related, I'll split topic.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: UTeam - Set teams based on usergroup.
« Reply #220 on: October 05, 2009, 08:01:48 PM »
Unfortunately, I was unable to help mrm.
I'll continue to look at the files he sent me, but unless it's a whitespace issue in ULib 2.3, and Uteam, all syntax seems correct.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: UTeam - Set teams based on usergroup.
« Reply #221 on: October 07, 2009, 09:48:42 AM »
Somethings gotta be throwing those keyvalue errors, looks like it's probably originating from C++...
Experiencing God's grace one day at a time.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: UTeam - Set teams based on usergroup.
« Reply #222 on: October 07, 2009, 03:32:31 PM »
He may have some whitespace in his Gmod users.txt (not ULib)
Though I had him remove the "admin" { "" "" } bit he had, I didn't actually send him a modded file.
May try that next.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline meinsla

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
Re: UTeam - Set teams based on usergroup.
« Reply #223 on: October 13, 2009, 06:46:47 PM »
It seems I am having a similar problem as Darkflamer. After entering the server, I am put into the "unassigned" team for some reason (despite me being a superadmin). And for some odd reason, it only does it when the server is running spacebuild. On sandbox mode, this mod works perfectly. As soon as I change the gamemode, I get put in unassigned. I retain the superadmin powers but I am not put into the proper team.

I am a bit unsure as to what to enter into the UTeam.txt file under "gamemodes." I tried adding second one called "Spacebuild2" (because that's what it's currently called in its data.txt file) but that didn't work.

How can I get my teams to work in different gamemodes other than sandbox?


Edit: Nevermind, I seem to have gotten it working. I am pretty sure all I did was replaced UTeam 1.0 with UTeam 1.1. :D thanks anyway guys.
« Last Edit: October 13, 2009, 09:21:20 PM by meinsla »

Offline Vexont

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
Re: UTeam - Set teams based on usergroup.
« Reply #224 on: October 26, 2009, 01:55:13 PM »
I've rewritten my groups and uteam 3 times now and no matter what I do, everyone is named "Unassigned"

Keep in mind, I just got a new server and I haven't worked on uteam and groups for at least 5 months, so it comes as no surprise I'm just making some noob mistake.

here is the file.

Thanks in advanced!