FileSize(FILE)
ASSERT(FILE)
var/leng=length(FILE)
if(leng < 1024) return "[leng] Bytes"
leng /= 1024
if(leng < 1024) return "[leng] Kilobytes"
leng /= 1024
if(leng < 1024) return "[leng] Megabytes"
leng /= 1024
return "[leng] Gigabytes"
Problem description:
I think my file size proc is wrong. it isnt giving me accurate readings. anyone know whats wrong?
If this starts spitting out terabyte, or gigabyte even, you need to look into this procedure more. Post back, maybe it's a BYOND bug or something I am overlooking. I really don't see anything wrong with either procedure.