ID:593503
 
Code:
ChooseImage()
var/icon/i = input(src, "Please choose an image!") as icon|null
fcopy(i, "images/[src.key].png")
src.icon = i


Problem description:
The fcopy line says
Runtime Error: Bad File

I use the copy, to reload their image with:
if(fexists("images/[src.key]"))
src.icon = file("images/[src.key].png")


I am assuming this either has to do with me labeling I as an "icon", or with me making any type of image file used a PNG?

Edit: Those are procs by the way, not verbs.
It's working fine for me, even remotely. Is it not working at all for you? The only time I get that error is if I press the cancel button, which you can fix by doing an if(i) check before running the fcopy().

I would also suggest saving it by their ckey and not their key.

Uhm, when selecting certain images, it gives a Bad File runtime error, but still works. It's an inconvenience more-so then a problem, I just don't want any errors.
Can you think of anything that sets those images apart from the ones that do work? Do they consistently fail?
It's a bit of a stretch but try clearing your cache.
They don't fail, at all. It still works, but only if I change a single pixel on them. It does feel like a cache issue, is this a bug with byond?