Author Topic: Things break when changing gamemode and map and it isn't our fault  (Read 2408 times)

0 Members and 1 Guest are viewing this topic.

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
FYI, when you change gamemodes some things will break. It appears that the behavior of the file library changes when there has been a gamemode change, this is something Garry will need to fix.

On server load:
Code: [Select]
lua_run print( file.Read( ULib.UCL_USERS, "DATA" ) )
> print( file.Read( ULib.UCL_USERS, "DATA" ) )...
"STEAM_0:1:4566757"
{
        "name"  "[41]Zoot!"
        "deny"
        {
        }
        "allow"
        {
        }
        "group" "superadmin"
}

Then,
Code: [Select]
gamemode base
Changing gamemode to Base (base)
Adding Legacy Addon 'i:\srcds\orangebox\garrysmod\addons\ulib'
Adding Legacy Addon 'i:\srcds\orangebox\garrysmod\addons\ulx'
lua_run print( file.Read( ULib.UCL_USERS, "DATA" ) )
> print( file.Read( ULib.UCL_USERS, "DATA" ) )...
"STEAM_0:1:4566757"
{
        "name"  "[41]Zoot!"
        "deny"
        {
        }
        "allow"
        {
        }
        "group" "superadmin"
}

Base gamemode was chosen just to show it's not a TTT issue. Still works after a gamemode change without map change, but...

Code: [Select]
changelevel gm_flatgrass
<snip>
lua_run print( file.Read( ULib.UCL_USERS, "DATA" ) )
> print( file.Read( ULib.UCL_USERS, "DATA" ) )...
//ATTENTION! This is a default file. DO NOT EDIT THIS FILE!!!
//Instead, edit the version in <garrysmod root>/data/ULib/users.txt if it exists. If it doesn't, copy this file over to create it.
//IF YOU MAKE CHANGES TO THIS FILE THEY WILL BE ERASED!

It is now reading from the default file. No, this doesn't happen when changing levels without changing gamemodes.
Experiencing God's grace one day at a time.

Offline iSnipeu

  • Jr. Member
  • **
  • Posts: 83
  • Karma: 12
Re: Things break when changing gamemode and map and it isn't our fault
« Reply #1 on: October 28, 2012, 07:44:45 PM »
Hmm, I'm guessing that when you change the gamemode it would reload the addons into the file system overwriting the data file?

Anyway, wouldn't removing the default file fix that issue? (as long as the ULib users file actually exists)

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Things break when changing gamemode and map and it isn't our fault
« Reply #2 on: November 03, 2012, 12:20:29 PM »
It appears Garry has fixed this problem
Experiencing God's grace one day at a time.