ID:140238
 
Avatar_Upload(var/T as text)
winset(src,"profile.avatar","image=\ref[fcopy_rsc(T)]")
alert(src,"You have successfully uploaded your avatar.")


I know I am doing this wrong first off. I don't quite understand how to get an image from a link and have it copied to the cache. Any help please, is appreciated.

T is simply a text string, so not what you want here. You'd need to create a new icon with icon() and then use fcopy_rsc() on that.

If you want to fetch something from a URL, you will need to use world.Export().
In response to Garthor
I won't mess with it right now since I have a headache, and I'm just not getting it lol.

I got the world.Export part, I saw that the image is in the dyn.rsc file, but I don't get what to do with that icon()
Why not just use a browser control and some simple HTML?
In response to BananasInPajamas
Going from the example for world.Export() in the Reference:

winset(src,"blah","image=\ref[fcopy_rsc(html["CONTENT"])")


I'm not sure if fcopy_rsc() would be needed in this case, actually. Or if you'll need to wrap the html["CONTENT"] in an icon() as well. Fiddle with it.
In response to Garthor
Oh God I feel retarded lol, that is simple. It works, thanks a ton.