Fixes SQL death reporting runtime

This commit is contained in:
Krausus
2015-05-14 04:44:25 -04:00
parent 9396ec035c
commit 494ffc00a1
+10 -6
View File
@@ -47,9 +47,11 @@ proc/sql_report_death(var/mob/living/carbon/human/H)
if(!H.key || !H.mind)
return
var/turf/T = H.loc
var/area/placeofdeath = get_area(T.loc)
var/podname = placeofdeath.name
var/turf/T = get_turf(H)
var/area/placeofdeath = get_area(T)
var/podname = sanitizeSQL("Unknown Area")
if(placeofdeath)
podname = sanitizeSQL(placeofdeath.name)
var/sqlname = sanitizeSQL(H.real_name)
var/sqlkey = sanitizeSQL(H.key)
@@ -82,9 +84,11 @@ proc/sql_report_cyborg_death(var/mob/living/silicon/robot/H)
if(!H.key || !H.mind)
return
var/turf/T = H.loc
var/area/placeofdeath = get_area(T.loc)
var/podname = placeofdeath.name
var/turf/T = get_turf(H)
var/area/placeofdeath = get_area(T)
var/podname = sanitizeSQL("Unknown Area")
if(placeofdeath)
podname = sanitizeSQL(placeofdeath.name)
var/sqlname = sanitizeSQL(H.real_name)
var/sqlkey = sanitizeSQL(H.key)