From 522cdfc0e24b45cf02d8c22cef85fa32408f1376 Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Mon, 21 Aug 2017 20:43:26 -0400 Subject: Fixed a bug with server teleporters Server teleports were not saveing to the database in the right format --- gamemode/core/mapstich/sv_mapstich.lua | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'gamemode/core/mapstich') diff --git a/gamemode/core/mapstich/sv_mapstich.lua b/gamemode/core/mapstich/sv_mapstich.lua index 121c0c9..7a90189 100644 --- a/gamemode/core/mapstich/sv_mapstich.lua +++ b/gamemode/core/mapstich/sv_mapstich.lua @@ -23,8 +23,9 @@ local function SavePlayerData(ply) ]] local pmet = util.TableToJSON({ lastserver = game.GetIPAddress(), - lastlocation = ply:GetPos() + 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) @@ -48,16 +49,14 @@ net.Receive("art_zonechange",function(len,ply) dontupdatedisconnect[ply] = true local query = [[ - UPDATE playerdata SET PlayerData='%s',MetaData='%s' WHERE SteamID=%.0f + UPDATE playerdata SET MetaData='%s' WHERE SteamID=%.0f ]] - local pdat = util.TableToJSON(ply.data) local pmet = util.TableToJSON({ lastserver = zone.toserver, - lastlocation = zone.topos + lastlocation = tostring(zone.topos) }) - print("pdat is", pdat) print("pmet is", pmet) - local fquery = q.s_fmt(query,pdat,pmet,ply:SteamID64()) + local fquery = q.s_fmt(query,pmet,ply:SteamID64()) print("fquery was", fquery) print("Running query:",qc) MySQLite.query(fquery,function(data) -- cgit v1.2.3-70-g09d2