var/icon/I = input("Choose an icon for [src.name] from your system","Change Icon") as null|icon
if(!I)
return
/*// If the icon/picture is bigger than roughly 50.1 KB (the decimal to give a little headroom)
if(length(I) > 51303)
Display_Admin_Announce(usr,"Sorry, but pictures over 50 KB are prohibited.")
return*/
I.Scale(50,50)
src.icon = i
Problem description:
So since apparently I can't resize images for buttons, I'm trying to instead automatically force a scaling of the image upon upload, and yet for some reason it's returning a runtime error of:
runtime error: Cannot execute null.Scale().
proc name: Change Icon (/obj/Base_Character/proc/Change_Icon)
usr: Darth_Chaos7 (/mob)
src: Hai (/obj/Base_Character/Character)
call stack:
Hai (/obj/Base_Character/Character): Change Icon()
Hai (/obj/Base_Character/Character): DblClick("Players Online", "InfoWindow.info1", "icon-x=58;icon-y=10;left=1")
You have to create an object, using icon(), or /new:
This is an option.