diff options
| author | Alexander Pickering <alexandermpickering@gmail.com> | 2017-08-21 20:43:26 -0400 |
|---|---|---|
| committer | Alexander Pickering <alexandermpickering@gmail.com> | 2017-08-21 20:43:26 -0400 |
| commit | 522cdfc0e24b45cf02d8c22cef85fa32408f1376 (patch) | |
| tree | 463ce70002a98847bdd6f6d78f479276cf92c684 /gamemode/core/mapstich | |
| parent | 5e6e88f98300d4c3d41aad7cff5346539f4f9f66 (diff) | |
| download | artery-522cdfc0e24b45cf02d8c22cef85fa32408f1376.tar.gz artery-522cdfc0e24b45cf02d8c22cef85fa32408f1376.tar.bz2 artery-522cdfc0e24b45cf02d8c22cef85fa32408f1376.zip | |
Fixed a bug with server teleporters
Server teleports were not saveing to the database in the right format
Diffstat (limited to 'gamemode/core/mapstich')
| -rw-r--r-- | gamemode/core/mapstich/sv_mapstich.lua | 11 |
1 files changed, 5 insertions, 6 deletions
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) |
