• TTT gamemode problems
    4 replies, posted
Heey guys, I'm kinda new into hosting a server but i've got myself quite far with a TTT gamemode for now (as i say myself hahaha) now i have 2 problems, 1. When my server reachs the amount of players to let a round start the round won't start. I'll have to force the round start by ttt_roundrestart. I've checked if i'm not in spectator mode, I've also tried to set; TTT_minimum_players 1 and it still won't start the round. And after a round i get this error: [code]18:11:04 Lua Error: [ERROR] gamemodes/terrortown/entities/entities/ttt_map_settings.lua:27: attempt to index field 'crowbar_unlocks' (a nil value) 1. unknown - gamemodes/terrortown/entities/entities/ttt_map_settings.lua:27 2. CleanUpMap - [C]:-1 3. CleanUp - gamemodes/terrortown/gamemode/init.lua:383 4. unknown - gamemodes/terrortown/gamemode/init.lua:466 18:11:04 Lua Error: [ERROR] gamemodes/terrortown/entities/entities/ttt_map_settings.lua:20: attempt to index field 'crowbar_unlocks' (a nil value) 1. unknown - gamemodes/terrortown/entities/entities/ttt_map_settings.lua:20 2. CleanUpMap - [C]:-1 3. CleanUp - gamemodes/terrortown/gamemode/init.lua:383 4. unknown - gamemodes/terrortown/gamemode/init.lua:466 18:11:04 Lua Error: [ERROR] gamemodes/terrortown/entities/entities/ttt_map_settings.lua:24: attempt to index field 'crowbar_unlocks' (a nil value) 1. unknown - gamemodes/terrortown/entities/entities/ttt_map_settings.lua:24 2. CleanUpMap - [C]:-1 3. CleanUp - gamemodes/terrortown/gamemode/init.lua:383 4. unknown - gamemodes/terrortown/gamemode/init.lua:466 18:11:04 Lua Error: [ERROR] gamemodes/terrortown/entities/entities/ttt_map_settings.lua:27: attempt to index field 'crowbar_unlocks' (a nil value) 1. unknown - gamemodes/terrortown/entities/entities/ttt_map_settings.lua:27 2. CleanUpMap - [C]:-1 3. CleanUp - gamemodes/terrortown/gamemode/init.lua:383 4. unknown - gamemodes/terrortown/gamemode/init.lua:466 18:11:04 Lua Error: [ERROR] gamemodes/terrortown/entities/entities/ttt_map_settings.lua:20: attempt to index field 'crowbar_unlocks' (a nil value) 1. unknown - gamemodes/terrortown/entities/entities/ttt_map_settings.lua:20 2. CleanUpMap - [C]:-1 3. CleanUp - gamemodes/terrortown/gamemode/init.lua:383 4. unknown - gamemodes/terrortown/gamemode/init.lua:466 18:11:04 Lua Error: [ERROR] gamemodes/terrortown/entities/entities/ttt_map_settings.lua:24: attempt to index field 'crowbar_unlocks' (a nil value) 1. unknown - gamemodes/terrortown/entities/entities/ttt_map_settings.lua:24 2. CleanUpMap - [C]:-1 3. CleanUp - gamemodes/terrortown/gamemode/init.lua:383 4. unknown - gamemodes/terrortown/gamemode/init.lua:466[/code] I've followed up the location "gamemodes/terrortown/entities/entities/ttt_map_settings.lua" Opened the config and now i'm looking at the as far i've know ''standard ttt_map_settings script" [code] ENT.Type = "point" ENT.Base = "base_point" function ENT:Initialize() -- Backwards compatibility: TTT maps compiled before the addition of the -- propspec setting may expect it to be off, so default it to off if a map -- settings entity exists (a reliable way of identifying a TTT map) GAMEMODE.propspec_allow_named = false self.Outputs = self.Outputs or {} self:TriggerOutput("MapSettingsSpawned", self) end function ENT:KeyValue(k, v) if k == "cbar_doors" then Dev(2, "ttt_map_settings: crowbar door unlocking = " .. v) local opens = (v == "1") GAMEMODE.crowbar_unlocks[OPEN_DOOR] = opens GAMEMODE.crowbar_unlocks[OPEN_ROT] = opens elseif k == "cbar_buttons" then Dev(2, "ttt_map_settings: crowbar button unlocking = " .. v) GAMEMODE.crowbar_unlocks[OPEN_BUT] = (v == "1") elseif k == "cbar_other" then Dev(2, "ttt_map_settings: crowbar movelinear unlocking = " .. v) GAMEMODE.crowbar_unlocks[OPEN_NOTOGGLE] = (v == "1") elseif k == "plymodel" and v != "" then -- can ignore if empty if util.IsValidModel(v) then util.PrecacheModel(v) GAMEMODE.force_plymodel = v Dev(2, "ttt_map_settings: set player model to be " .. v) else Dev(2, "ttt_map_settings: FAILED to set player model due to invalid path: " .. v) end elseif k == "propspec_named" then Dev(2, "ttt_map_settings: propspec possessing named props = " .. v) GAMEMODE.propspec_allow_named = (v == "1") elseif k == "MapSettingsSpawned" or k == "RoundEnd" or k == "RoundPreparation" or k == "RoundStart" then self:StoreOutput(k, v) end end function ENT:AcceptInput(name, activator, caller, data) if name == "SetPlayerModels" then local mdlname = tostring(data) if not mdlname then ErrorNoHalt("ttt_map_settings: Invalid parameter to SetPlayerModels input!\n") return false elseif not util.IsValidModel(mdlname) then ErrorNoHalt("ttt_map_settings: Invalid model given: " .. mdlname .. "\n") return false end GAMEMODE.force_plymodel = Model(mdlname) Dev(2, "ttt_map_settings: input set player model to be " .. mdlname) return true end end -- Fire an output when the round changes function ENT:RoundStateTrigger(r, data) if r == ROUND_PREP then self:TriggerOutput("RoundPreparation", self) elseif r == ROUND_ACTIVE then self:TriggerOutput("RoundStart", self) elseif r == ROUND_POST then self.Outputs = self.Outputs or {} if not self.Outputs["RoundEnd"] then return end -- RoundEnd has the type of win condition as param for _, op in pairs(self.Outputs["RoundEnd"]) do op.param = tostring(data) end self:TriggerOutput("RoundEnd", self) end end [/code] Also figured out that line 20/24/27 is about : [CODE]20:GAMEMODE.crowbar_unlocks[OPEN_DOOR] = opens 24:GAMEMODE.crowbar_unlocks[OPEN_BUT] = (v == "1") GAMEMODE.crowbar_unlocks[OPEN_NOTOGGLE] = (v == "1")[/CODE] Seems like there is some error or in the script or i'm missing some file? Any1 could give me a lil direction?
What have you been messing with then? These errors dont appear on their own...
[QUOTE=bluebull107;45709192]What have you been messing with then? These errors dont appear on their own...[/QUOTE] I didn't touch the gamemode files at all... I've svn installed the gamemode added the maps and went testing it, this been like this from point 0. I think i'll delete + reinstall the gamemode and try if that works out...
That would probably be the smartest decision.
resolved
Sorry, you need to Log In to post a reply to this thread.