So I have the karma ban limit on 600, but instead of banning the person, i get this error in the server log.
[lua] [ERROR] gamemodes/terrortown/gamemode/admin.lua:184: attempt to index global 'evolve' (a nil value)
1. banfn - gamemodes/terrortown/gamemode/admin.lua:184
2. PerformKickBan - gamemodes/terrortown/gamemode/admin.lua:215
3. KickBan - gamemodes/terrortown/gamemode/player_ext.lua:320
4. CheckAutoKick - gamemodes/terrortown/gamemode/karma.lua:349
5. RoundEnd - gamemodes/terrortown/gamemode/karma.lua:257
6. EndRound - gamemodes/terrortown/gamemode/init.lua:762
7. unknown - gamemodes/terrortown/gamemode/init.lua:301
Timer Failed! [winchecker][@gamemodes/terrortown/gamemode/init.lua (line 348)]
[/lua]
Also I have an autoslay on my server, but when i auto slay people they get lua errors an it kicks them from the server
[lua]*DEAD*(TEAM) Sir Det Rapeâ?¢ /)PB(\: !as Sir
[Sir Det Rapeâ?¢ /)PB(\|98|STEAM_0:0:50329026] Lua Error:
[ERROR] LuaCmd:1: unfinished string near '<eof>'
1. unknown - LuaCmd:0[/lua]
I'm not very god with lua so i was wandering if anyone could help me with this?
It is trying to use Evolve to ban the guy. Also, post your code.
Ah sorry. This is the code init.lua code. But im not sure what the file is for the second error concerning the auto slay.
[lua] ---- Trouble in Terrorist Town
AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
AddCSLuaFile("cl_hud.lua")
AddCSLuaFile("cl_msgstack.lua")
AddCSLuaFile("cl_hudpickup.lua")
AddCSLuaFile("cl_keys.lua")
AddCSLuaFile("cl_wepswitch.lua")
AddCSLuaFile("cl_awards.lua")
AddCSLuaFile("cl_scoring_events.lua")
AddCSLuaFile("cl_scoring.lua")
AddCSLuaFile("cl_popups.lua")
AddCSLuaFile("cl_equip.lua")
AddCSLuaFile("equip_items_shd.lua")
AddCSLuaFile("cl_help.lua")
AddCSLuaFile("cl_scoreboard.lua")
AddCSLuaFile("cl_tips.lua")
AddCSLuaFile("cl_voice.lua")
AddCSLuaFile("scoring_shd.lua")
AddCSLuaFile("util.lua")
AddCSLuaFile("lang_shd.lua")
AddCSLuaFile("corpse_shd.lua")
AddCSLuaFile("player_ext_shd.lua")
AddCSLuaFile("weaponry_shd.lua")
AddCSLuaFile("cl_radio.lua")
AddCSLuaFile("cl_radar.lua")
AddCSLuaFile("cl_tbuttons.lua")
AddCSLuaFile("cl_disguise.lua")
AddCSLuaFile("cl_transfer.lua")
AddCSLuaFile("cl_search.lua")
AddCSLuaFile("cl_targetid.lua")
AddCSLuaFile("vgui/ColoredBox.lua")
AddCSLuaFile("vgui/SimpleIcon.lua")
AddCSLuaFile("vgui/ProgressBar.lua")
AddCSLuaFile("vgui/ScrollLabel.lua")
AddCSLuaFile("vgui/sb_main.lua")
AddCSLuaFile("vgui/sb_row.lua")
AddCSLuaFile("vgui/sb_team.lua")
AddCSLuaFile("vgui/sb_info.lua")
include("resources.lua")
include("shared.lua")
include("karma.lua")
include("entity.lua")
include("scoring_shd.lua")
include("radar.lua")
include("admin.lua")
include("traitor_state.lua")
include("propspec.lua")
include("weaponry.lua")
include("gamemsg.lua")
include("ent_replace.lua")
include("scoring.lua")
include("corpse.lua")
include("player_ext_shd.lua")
include("player_ext.lua")
include("player.lua")
include("tags.lua")
CreateConVar("ttt_roundtime_minutes", "10", FCVAR_NOTIFY)
CreateConVar("ttt_preptime_seconds", "30", FCVAR_NOTIFY)
CreateConVar("ttt_posttime_seconds", "30", FCVAR_NOTIFY)
CreateConVar("ttt_firstpreptime", "60")
local ttt_haste = CreateConVar("ttt_haste", "1", FCVAR_NOTIFY)
CreateConVar("ttt_haste_starting_minutes", "5", FCVAR_NOTIFY)
CreateConVar("ttt_haste_minutes_per_death", "0.5", FCVAR_NOTIFY)
CreateConVar("ttt_spawn_wave_interval", "0")
CreateConVar("ttt_traitor_pct", "0.25")
CreateConVar("ttt_traitor_max", "32")
CreateConVar("ttt_detective_pct", "0.13", FCVAR_NOTIFY)
CreateConVar("ttt_detective_max", "32")
CreateConVar("ttt_detective_min_players", "8")
CreateConVar("ttt_detective_karma_min", "600")
-- Traitor credits
CreateConVar("ttt_credits_starting", "2")
CreateConVar("ttt_credits_award_pct", "0.35")
CreateConVar("ttt_credits_award_size", "1")
CreateConVar("ttt_credits_award_repeat", "1")
CreateConVar("ttt_credits_detectivekill", "1")
CreateConVar("ttt_credits_alonebonus", "1")
-- Detective credits
CreateConVar("ttt_det_credits_starting", "1")
CreateConVar("ttt_det_credits_traitorkill", "0")
CreateConVar("ttt_det_credits_traitordead", "1")
CreateConVar("ttt_announce_deaths", "1", FCVAR_ARCHIVE + FCVAR_NOTIFY)
CreateConVar("ttt_use_weapon_spawn_scripts", "1")
CreateConVar("ttt_always_use_mapcycle", "0")
CreateConVar("ttt_round_limit", "6", FCVAR_ARCHIVE + FCVAR_NOTIFY + FCVAR_REPLICATED)
CreateConVar("ttt_time_limit_minutes", "75", FCVAR_NOTIFY + FCVAR_REPLICATED)
CreateConVar("ttt_idle_limit", "180", FCVAR_NOTIFY)
CreateConVar("ttt_voice_drain", "0", FCVAR_NOTIFY)
CreateConVar("ttt_voice_drain_normal", "0.2", FCVAR_NOTIFY)
CreateConVar("ttt_voice_drain_admin", "0.05", FCVAR_NOTIFY)
CreateConVar("ttt_voice_drain_recharge", "0.05", FCVAR_NOTIFY)
CreateConVar("ttt_namechange_kick", "1", FCVAR_NOTIFY)
CreateConVar("ttt_namechange_bantime", "10")
local ttt_detective = CreateConVar("ttt_sherlock_mode", "1", FCVAR_ARCHIVE + FCVAR_NOTIFY)
local ttt_minply = CreateConVar("ttt_minimum_players", "2", FCVAR_ARCHIVE + FCVAR_NOTIFY)
-- debuggery
local ttt_dbgwin = CreateConVar("ttt_debug_preventwin", "0")
-- Localise stuff we use often. It's like Lua go-faster stripes.
local math = math
local table = table
local umsg = umsg
local player = player
local timer = timer
---- Round mechanics
function GM:Initialize()
MsgN("Trouble In Terrorist Town gamemode initializing...")
ShowVersion()
-- Force friendly fire to be enabled. If it is off, we do not get lag compensation.
RunConsoleCommand("mp_friendlyfire", "1")
-- Default crowbar unlocking settings, may be overridden by config entity
GAMEMODE.crowbar_unlocks = {
[OPEN_DOOR] = true,
[OPEN_ROT] = true,
[OPEN_BUT] = true,
[OPEN_NOTOGGLE]= true
};
-- More map config ent defaults
GAMEMODE.force_plymodel = ""
GAMEMODE.propspec_allow_named = true
GAMEMODE.MapWin = WIN_NONE
GAMEMODE.AwardedCredits = false
GAMEMODE.AwardedCreditsDead = 0
GAMEMODE.round_state = ROUND_WAIT
GAMEMODE.FirstRound = true
GAMEMODE.RoundStartTime = 0
GAMEMODE.DamageLog = {}
GAMEMODE.LastRole = {}
GAMEMODE.playermodel = GetRandomPlayerModel()
GAMEMODE.playercolor = COLOR_WHITE
-- Delay reading of cvars until config has definitely loaded
GAMEMODE.cvar_init = false
SetGlobalFloat("ttt_round_end", -1)
SetGlobalFloat("ttt_haste_end", -1)
-- For the paranoid
math.randomseed(os.time())
WaitForPlayers()
if cvars.Number("sv_alltalk", 0) > 0 then
ErrorNoHalt("TTT WARNING: sv_alltalk is enabled. Dead players will be able to talk to living players. TTT will now attempt to set sv_alltalk 0.\n")
RunConsoleCommand("sv_alltalk", "0")
end
local cstrike = false
for _, g in pairs(engine.GetGames()) do
if g.folder == 'cstrike' then cstrike = true end
end
if not cstrike then
ErrorNoHalt("TTT WARNING: CS:S does not appear to be mounted by GMod. Things may break in strange ways. Server admin? Check the TTT readme for help.\n")
end
GAMEMODE:CheckFileConsistency()
end
function GM:InitPostEntity()
self.Customized = WEPS.HasCustomEquipment()
self:UpdateServerTags()
end
-- Used to do this in Initialize, but server cfg has not always run yet by that
-- point.
function GM:InitCvars()
MsgN("TTT initializing convar settings...")
-- Initialize game state that is synced with client
SetGlobalInt("ttt_rounds_left", GetConVar("ttt_round_limit"):GetInt())
GAMEMODE:SyncGlobals()
KARMA.InitState()
self.cvar_init = true
end
function GM:GetGameDescription() return self.Name end
-- Convar replication is broken in gmod, so we do this.
-- I don't like it any more than you do, dear reader.
function GM:SyncGlobals()
SetGlobalBool("ttt_detective", ttt_detective:GetBool())
SetGlobalBool("ttt_haste", ttt_haste:GetBool())
SetGlobalInt("ttt_time_limit_minutes", GetConVar("ttt_time_limit_minutes"):GetInt())
SetGlobalBool("ttt_highlight_admins", GetConVar("ttt_highlight_admins"):GetBool())
SetGlobalBool("ttt_locational_voice", GetConVar("ttt_locational_voice"):GetBool())
SetGlobalInt("ttt_idle_limit", GetConVar("ttt_idle_limit"):GetInt())
SetGlobalBool("ttt_voice_drain", GetConVar("ttt_voice_drain"):GetBool())
SetGlobalFloat("ttt_voice_drain_normal", GetConVar("ttt_voice_drain_normal"):GetFloat())
SetGlobalFloat("ttt_voice_drain_admin", GetConVar("ttt_voice_drain_admin"):GetFloat())
SetGlobalFloat("ttt_voice_drain_recharge", GetConVar("ttt_voice_drain_recharge"):GetFloat())
end
function SendRoundState(state, ply)
if ply then
umsg.Start("round_state", ply)
else
umsg.Start("round_state")
end
umsg.Char(state)
umsg.End()
end
-- Round state is encapsulated by set/get so that it can easily be changed to
-- eg. a networked var if this proves more convenient
function SetRoundState(state)
GAMEMODE.round_state = state
SCORE:RoundStateChange(state)
SendRoundState(state)
end
function GetRoundState()
return GAMEMODE.round_state
end
local function EnoughPlayers()
local ready = 0
-- only count truly av
Admin mod.
[QUOTE=Robotboy655;42369961]Admin mod.[/QUOTE]
So if I take out the autoban for karma in my server.cfg will that allow the mod I have to autoban them?
I didn't ask for TTTs init.lua, I asked for YOUR code, the one that adds karma limit and the !as command.
[editline]1st October 2013[/editline]
[QUOTE=Toshiinator;42369977]So if I take out the autoban for karma in my server.cfg will that allow the mod I have to autoban them?[/QUOTE]
I have no idea, I don't know what are you using to autoban ppl.
[lua] local CATEGORY_NAME = "TTT"
function ulx.autoslay(calling_ply, target_plys, ramount, reason, should_revoke)
if should_revoke then
if ( tonumber(target_plys:GetPData( "As_ramount" )) == 0) then
ULib.tsayError( calling_ply, target_plys:Nick() .. " doesn't have any slays pending against them. ", true )
return
end
target_plys:SetPData( "As_ramount", 0 )
target_plys:SetPData( "As_reason", "" )
target_plys:SetPData( "As_by", "" )
ulx.fancyLogAdmin( calling_ply, "#A removed all pending slays from #T", target_plys )
target_plys:SendLua("notification.AddLegacy(\"[Auto Slay] All autoslays against you have been removed. This was done by "..calling_ply:Nick().."\", NOTIFY_ERROR, 10)")
target_plys:SendLua("surface.PlaySound(\"buttons/button15.wav\")")
target_plys.snrby = nil
return
end
if ( tonumber(target_plys:GetPData( "As_ramount" )) > 0) then
ULib.tsayError( calling_ply, target_plys:Nick() .. " is already being slain by " .. target_plys:GetPData( "As_by" ), true )
elseif ramount == 1 then
if reason == "" then
ulx.fancyLogAdmin( calling_ply, "#A set #T to be slain for the next round", target_plys )
quote1 = ""
quote2 = ""
else
ulx.fancyLogAdmin( calling_ply, "#A set #T to be slain for the next round for #3s", target_plys, reason )
quote1 = " for '"
quote2 = "'"
end
target_plys:SetPData( "As_ramount", ramount )
target_plys:SetPData( "As_reason", reason )
target_plys:SetPData( "As_by", calling_ply:Nick() )
target_plys:SendLua("notification.AddLegacy(\"[Auto Slay] You will be slain in the next round. This was done by "..calling_ply:Nick()..""..quote1..""..reason..""..quote2.."\", NOTIFY_ERROR, 10)")
target_plys:SendLua("notification.AddLegacy(\"[Auto Slay] Attempting to leave while being autoslain will result in a day ban for each slay which will then be extended by staff.\", NOTIFY_ERROR, 10)")
target_plys:SendLua("surface.PlaySound(\"buttons/button15.wav\")")
elseif ramount > 1 then
if reason == "" then
ulx.fancyLogAdmin( calling_ply, "#A set #T to be slain for the next#2i rounds", target_plys, ramount )
quote1 = ""
quote2 = ""
else
ulx.fancyLogAdmin( calling_ply, "#A set #T to be slain for the next#2i rounds for #3s", target_plys, ramount, reason )
quote1 = " for '"
quote2 = "'"
end
target_plys:SetPData( "As_ramount", ramount )
target_plys:SetPData( "As_reason", reason )
target_plys:SetPData( "As_by", calling_ply:Nick() )
target_plys:SendLua("notification.AddLegacy(\"[Auto Slay] You will be slain for the next "..ramount.." rounds. This was done by ".. calling_ply:Nick() ..""..quote1..""..reason..""..quote2.."\", NOTIFY_ERROR, 10)")
target_plys:SendLua("notification.AddLegacy(\"[Auto Slay] Attempting to leave while being autoslain will result in a day ban for each slay which will then be extended by staff.\", NOTIFY_ERROR, 10)")
target_plys:SendLua("surface.PlaySound(\"buttons/button15.wav\")")
end
end
local _andas = ulx.command( CATEGORY_NAME, "ulx autoslay", ulx.autoslay, "!as" )
_andas:addParam{ type=ULib.cmds.PlayerArg }
_andas:addParam{ type=ULib.cmds.NumArg, min=1, max=10, default=1, hint="round amount", ULib.cmds.optional }
_andas:addParam{ type=ULib.cmds.StringArg, hint="reason", ULib.cmds.optional, ULib.cmds.takeRestOfLine }
_andas:addParam{ type=ULib.cmds.BoolArg, hint="should unautoslay", invisible=true }
_andas:defaultAccess( ULib.ACCESS_ADMIN )
_andas:help( "Slays target the following round(s) for RDM with a reason." )
_andas:setOpposite( "ulx unautoslay", {_, _, _, _, true}, "!unas" )
function ulx.pslays( calling_ply )
ULib.console( calling_ply, "Name Slay Amount Reason By" )
local players = player.GetAll()
for _, v in ipairs( player.GetAll() ) do
if v:IsValid() then
local nick = v:Nick()
text = nick..string.rep( " ", 35 - nick:len() )..tonumber(v:GetPData( "As_ramount" ))..string.rep( " ", 15 - 1 )..v:GetPData( "As_reason" )..string.rep( " ", 29 - v:GetPData( "As_reason" ):len() )..v:GetPData( "As_by" )
ULib.console( calling_ply, text )
end
end
end
local pslays = ulx.command( CATEGORY_NAME, "ulx printslays", ulx.pslays, "!ps" )
pslays:defaultAccess( ULib.ACCESS_ADMIN )
pslays:help( "See autoslay information about currently online users." )
[/lua]
That's the autoslay.lua
I'll have to get back to you on the karma one because from what i can see the admin mod I am using doesnt have any autokick for karma [URL="http://coderhire.com/scripts/view/229"]http://coderhire.com/scripts/view/229[/URL]
[editline]1st October 2013[/editline]
[QUOTE=Robotboy655;42369978]I didn't ask for TTTs init.lua, I asked for YOUR code, the one that adds karma limit and the !as command.
[editline]1st October 2013[/editline]
I have no idea, I don't know what are you using to autoban ppl.[/QUOTE]
Literally just whats in my server.cfg
[lua] "ttt_karma_low_amount" "600"
"ttt_karma_low_ban" "600"
ttt_karma_low_autokick "1"
"ttt_karma_low_ban" "1"
"ttt_karma_low_ban_minutes" "20" [/lua]
[QUOTE=Toshiinator;42370167]-code-
That's the autoslay.lua
I'll have to get back to you on the karma one because from what i can see the admin mod I am using doesnt have any autokick for karma [URL="http://coderhire.com/scripts/view/229"]http://coderhire.com/scripts/view/229[/URL]
[editline]1st October 2013[/editline]
Literally just whats in my server.cfg
[lua] "ttt_karma_low_amount" "600"
"ttt_karma_low_ban" "600"
ttt_karma_low_autokick "1"
"ttt_karma_low_ban" "1"
"ttt_karma_low_ban_minutes" "20" [/lua][/QUOTE]
Isn't this the Autoslay CH addon?
Yes it is. It automatically bans people if they leave which I don't particularly like but I wouldn't know how to change that. When I Auto-slay them for the next round, the player then gets the lua errors and is kicked.
[QUOTE=Toshiinator;42370307]Yes it is. It automatically bans people if they leave which I don't particularly like but I wouldn't know how to change that. When I Auto-slay them for the next round, the player then gets the lua errors and is kicked.[/QUOTE]
-snip-
Never mind, it's been removed from CH
Anyways, since I saved the code, what are the problems you're having with it?
As for karma kick, what's this option saved to:
[quote]
ttt_ban_type (def. autodetect):
Specifies how automatic bans made by TTT (low karma, namechange, etc) should be performed. This lets you specify whether TTT should use an admin plugin to ban, which can then make it easier to remove or adjust those bans using your admin plugin's interface.
Possible settings for this convar:
autodetect: Will detect the Lua-based plugins ULX and Evolve if present, else it will use standard "banid" bans.
ulx: Force the use of ULX/Ulib to ban.
evolve: Force the use of Evolve to ban.
sm: Will use Sourcemod's sm_ban command. Note that SM is not auto-detected.
gmod: Uses standard "banid" to ban. [/quote]
Seeing as you have ULX Autoslay, try setting it to ulx, not autodetect.
For AutoSlay, use it on yourself and get the whole error.
[QUOTE=Humility;42370327]-snip-
Never mind, it's been removed from CH
Anyways, since I saved the code, what are the problems you're having with it?
As for karma kick, what's this option saved to:
Seeing as you have ULX Autoslay, try setting it to ulx, not autodetect.
For AutoSlay, use it on yourself and get the whole error.[/QUOTE]
Ah ok then thanks. Do you mean change ttt_ban_type (def. autodetect): to ttt_ban_type (def. ulx): ?
[QUOTE=Toshiinator;42371946]Ah ok then thanks. Do you mean change ttt_ban_type (def. autodetect): to ttt_ban_type (def. ulx): ?[/QUOTE]
Def means default.
In your server.cfg, if you're using ULX, put:
ttt_ban_type ulx
Ah thanks for the help. I'll check to see if that worked when I get home from work :)
Sorry, you need to Log In to post a reply to this thread.