• TTT DNA Scanner error?
    8 replies, posted
Okay so, I bought a script off of coderhire a while back which modified the DNA scanner. It overwrote my old DNA scanner file. So, I went in the TTT files under my steam name and put that in the server. But it doesn't work and gives me this error. gamemodes/terrortown/entities/weapons/weapon_ttt_wtester/shared.lua:266: Calling net.Start with unpooled message name [[url]http://goo.gl/qcx0y][/url] It starts from line 261 and finishes at 275. [CODE]if SERVER then -- Sending this all in one umsg limits the max number of samples. 17 player -- samples and 20 item samples (with 20 matches) has been verified as -- working in the old DNA sampler. function SWEP:SendPrints(should_open) net.Start("TTT_ShowPrints", self.Owner) net.WriteBit(should_open) net.WriteUInt(#self.ItemSamples, 8) for k, v in ipairs(self.ItemSamples) do net.WriteString(v.cls) end net.Send(self.Owner) end[/CODE] Or, if you wouldn't mind posting your server DNA scanner file that would be great. I have no knowledge of Lua and help would be greatly appreciated. Thanks!
[QUOTE=fappymcfap;43646735]Okay so, I bought a script off of coderhire a while back which modified the DNA scanner. It overwrote my old DNA scanner file. So, I went in the TTT files under my steam name and put that in the server. But it doesn't work and gives me this error. gamemodes/terrortown/entities/weapons/weapon_ttt_wtester/shared.lua:266: Calling net.Start with unpooled message name [[url]http://goo.gl/qcx0y][/url] It starts from line 261 and finishes at 275. [CODE]if SERVER then -- Sending this all in one umsg limits the max number of samples. 17 player -- samples and 20 item samples (with 20 matches) has been verified as -- working in the old DNA sampler. function SWEP:SendPrints(should_open) net.Start("TTT_ShowPrints", self.Owner) net.WriteBit(should_open) net.WriteUInt(#self.ItemSamples, 8) for k, v in ipairs(self.ItemSamples) do net.WriteString(v.cls) end net.Send(self.Owner) end[/CODE] Or, if you wouldn't mind posting your server DNA scanner file that would be great. I have no knowledge of Lua and help would be greatly appreciated. Thanks![/QUOTE] [URL="https://github.com/garrynewman/garrysmod/blob/master/garrysmod/gamemodes/terrortown/entities/weapons/weapon_ttt_wtester/shared.lua"]https://github.com/garrynewman/garrysmod/blob/master/garrysmod/gamemodes/terrortown/entities/weapons/weapon_ttt_wtester/shared.lua[/URL]
That doesn't work. Could there be any other lua files associated with this one? I'm not sure wether I replaced another one :/
Is your TTT Base up to date? [url]https://github.com/garrynewman/garrysmod/blob/master/garrysmod/gamemodes/terrortown/entities/weapons/weapon_tttbase/shared.lua[/url]
[QUOTE=fappymcfap;43646735]Okay so, I bought a script off of coderhire a while back which modified the DNA scanner. It overwrote my old DNA scanner file. So, I went in the TTT files under my steam name and put that in the server. But it doesn't work and gives me this error. gamemodes/terrortown/entities/weapons/weapon_ttt_wtester/shared.lua:266: Calling net.Start with unpooled message name [[url]http://goo.gl/qcx0y][/url] [/QUOTE] Add the following line of code at the top of the script: [CODE]util.AddNetworkString("TTT_ShowPrints")[/CODE]
[QUOTE=YoshieMaster;43653580]Add the following line of code at the top of the script: [CODE]util.AddNetworkString("TTT_ShowPrints")[/CODE][/QUOTE] It still doesn't work :s The tttwtester script is the same as the one here: [url]https://github.com/garrynewman/garrysmod/blob/master/garrysmod/gamemodes/terrortown/entities/weapons/weapon_tttbase/shared.lua[/url] This is the full error. [ERROR] gamemodes/terrortown/entities/weapons/weapon_ttt_wtester/shared.lua:279: Calling net.Start with unpooled message name [[url]http://goo.gl/qcx0y][/url] 1. Start - [C]:-1 2. SendScan - gamemodes/terrortown/entities/weapons/weapon_ttt_wtester/shared.lua:279 3. PerformScan - gamemodes/terrortown/entities/weapons/weapon_ttt_wtester/shared.lua:331 4. GatherRagdollSample - gamemodes/terrortown/entities/weapons/weapon_ttt_wtester/shared.lua:161 5. oldprimary - gamemodes/terrortown/entities/weapons/weapon_ttt_wtester/shared.lua:120 6. unknown - addons/damagelog-master/lua/sv_damageinfos.lua:34 Basically I can't open the mouse 2 menu with the DNA Scanner nor does it work when I gather DNA on someone. I'm sorry if this is too much you don't need to help. It would be appreciated though. So this is the damageinfos.lua file here. [CODE] util.AddNetworkString("DL_AskDamageInfos") util.AddNetworkString("DL_SendDamageInfos") util.AddNetworkString("DL_AskShootLogs") util.AddNetworkString("DL_SendShootLogs") function Damagelog:shootCallback(weapon) local owner = weapon.Owner if GetRoundState() == ROUND_ACTIVE then if self.ShootTables[self.CurrentRound][self.Time] then local info = { owner:Nick(), weapon:GetClass() } table.insert(self.ShootTables[self.CurrentRound][self.Time], info) else table.insert(self.ShootTables[self.CurrentRound], self.Time, {}) local info = { owner:Nick(), weapon:GetClass() } table.insert(self.ShootTables[self.CurrentRound][self.Time], info) end end end function Damagelog:DamagelogInfos() for k,v in pairs(weapons.GetList()) do if v.Base == "weapon_tttbase" then if not v.PrimaryAttack then v.PrimaryAttack = function(wep) wep.BaseClass.PrimaryAttack(wep) if wep.BaseClass.CanPrimaryAttack(wep) and IsValid(wep.Owner) then self:shootCallback(wep) end end else local oldprimary = v.PrimaryAttack v.PrimaryAttack = function(wep) oldprimary(wep) Damagelog:shootCallback(wep) end end end end end hook.Add("Initialize", "Initialize_DamagelogInfos", function() Damagelog:DamagelogInfos() end) function Damagelog:SendDamageInfos(ply, t, att, victim, round) local results = {} local found = false for k,v in pairs(self.ShootTables[round] or {}) do if k >= t - 10 and k <= t then for s,i in pairs(v) do if i[1] == victim or i[1] == att then if results[k] == nil then table.insert(results, k, {}) end table.insert(results[k], i) found = true end end end end local beg = t - 10 if found then net.Start("DL_SendDamageInfos") net.WriteUInt(0,1) net.WriteUInt(beg, 32) net.WriteUInt(t, 32) net.WriteTable(results) net.WriteString(victim) net.WriteString(att) net.Send(ply) else net.Start("DL_SendDamageInfos") net.WriteUInt(1,1) net.WriteUInt(beg, 32) net.WriteUInt(t, 32) net.WriteString(victim) net.WriteString(att) net.Send(ply) end end net.Receive("DL_AskDamageInfos", function(_, ply) local time = net.ReadUInt(32) local attacker = net.ReadString() local victim = net.ReadString() local round = net.ReadUInt(32) Damagelog:SendDamageInfos(ply, time, attacker, victim, round) end) local orderedPairs = Damagelog.orderedPairs net.Receive("DL_AskShootLogs", function(_, ply) if not ply:CanUseDamagelog() then return end local data = Damagelog.ShootTables[net.ReadUInt(8)] if not data then return end data = table.Copy(data) local count = table.Count(data) local i = 0 if count <= 0 then net.Start("DL_SendShootLogs") net.WriteTable({"empty"}) net.WriteUInt(1, 1) net.Send(ply) else for k,v in orderedPairs(data) do i = i + 1 net.Start("DL_SendShootLogs") net.WriteTable(v) net.WriteUInt(i == count and 1 or 0, 1) net.Send(ply) end end end)[/CODE] From line 1 to 113. Is there something wrong with either one?
bump
Could you please post the contents of your garrysmod/gamemodes/terrortown/gamemode/init.lua file?
[QUOTE=YoshieMaster;43675379]Could you please post the contents of your garrysmod/gamemodes/terrortown/gamemode/init.lua file?[/QUOTE] [CODE]---- 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("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 available p
Sorry, you need to Log In to post a reply to this thread.