ID:166776
 
Right now i have about 37 avatars players can choose from, as a special feature I want to be able to make it so byond members can upload their own.

Is there a way I can check the size limits. As I do not want files over like 1MB being uploaded.
<code>length()</code> returns the size of a file in bytes.

~~> Unknown Person

var/ISize = 1000000
mob/verb/upload(i as icon)
if(length(i) > ISize){usr<<"File too big";return}
usr.icon=i
In response to Unknown Person
Doesn't this technically require that the player upload the file before its size can be checked?