aboutsummaryrefslogtreecommitdiff
path: root/gamemode/core/mapstich/sv_mapstich.lua
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2017-11-11 14:20:00 -0500
committerAlexander Pickering <alexandermpickering@gmail.com>2017-11-11 14:20:00 -0500
commit93568fcb09f3e971c50ca10da9b57eccc754cbe6 (patch)
tree63a353d1436f199e08fe17a527c55e879ec75077 /gamemode/core/mapstich/sv_mapstich.lua
parent2252904b8147419c551ad2653a20627281d0531f (diff)
downloadartery-93568fcb09f3e971c50ca10da9b57eccc754cbe6.tar.gz
artery-93568fcb09f3e971c50ca10da9b57eccc754cbe6.tar.bz2
artery-93568fcb09f3e971c50ca10da9b57eccc754cbe6.zip
Removed most of the debug print statements in the core
Also did some other stuff I guess
Diffstat (limited to 'gamemode/core/mapstich/sv_mapstich.lua')
-rw-r--r--gamemode/core/mapstich/sv_mapstich.lua22
1 files changed, 7 insertions, 15 deletions
diff --git a/gamemode/core/mapstich/sv_mapstich.lua b/gamemode/core/mapstich/sv_mapstich.lua
index 5fd8129..f4208dd 100644
--- a/gamemode/core/mapstich/sv_mapstich.lua
+++ b/gamemode/core/mapstich/sv_mapstich.lua
@@ -6,14 +6,18 @@
nrequire("sv_mysqlite.lua")
if not nrequire("sh_zones.lua") then return end
local q = nrequire("core/database/sv_queries.lua")
+local log = nrequire("log.lua")
--if not zones then error("This thing needs zones to function!") end
-print("Hello from sv_mapstich.lua")
util.AddNetworkString("art_zonechange")
util.AddNetworkString("art_sendtoserver")
local dontupdatedisconnect = {}
+local function sqlerror(err,sql)
+ log.error("Query error:\nQuery:",sql,"\nError:",err)
+end
+
local function SavePlayerData(ply)
local query
local pdat = q.serialize_player(ply)
@@ -31,16 +35,11 @@ local function SavePlayerData(ply)
lastserver = game.GetIPAddress(),
lastlocation = tostring(ply:GetPos())
})
- print("pmet turns out to be",pmet)
query = q.s_fmt(query,pdat,pmet,ply:SteamID64())
end
MySQLite.query(query,function(data)
- end,function(err,sql)
- print("Query error:")
- print("Query",sql)
- print("Error",err)
- end)
+ end,sqlerror)
end
---Saves the player.
@@ -64,21 +63,14 @@ net.Receive("art_zonechange",function(len,ply)
lastserver = zone.toserver,
lastlocation = tostring(zone.topos)
})
- print("pmet is", pmet)
local fquery = q.s_fmt(query,pmet,ply:SteamID64())
- print("fquery was", fquery)
- print("Running query:",qc)
MySQLite.query(fquery,function(data)
--Holy shit fuck garry for breaking this
--ply:ConCommand("connect " .. zone.toserver)
net.Start("art_sendtoserver")
net.WriteString(zone.toserver)
net.Send(ply)
- end,function(err,sql)
- print("Query error:")
- print("Query",sql)
- print("Error",err)
- end)
+ end,sqlerror)
end
end)
end)