ID:172973
 
proc/add_file() var/file = input("Share a file","File") as null|file if(isfile(file)) // just to check if it's a file sharedfiles += file src << "File \"[file]\" added!" else usr.notvalidfile() proc/download_file() if(sharedfiles.len) // checking if there is anything in the list, otherwise, it's worthless checking it var/file = input("Pick a file to download","File") in sharedfiles + "Cancel" if(file=="Cancel") return if(isfile(file)) // just to check if it is a real file src << ftp(file) usr << "File \"[file]\" downloaded." else usr:nofiles() there are no errors, but if you use it, it just says file [file] downloaded, and you cant find it back.. doesnt even ask where to save it.. this is originally made by unknown person, im always confused with some coding like this..</<>
Is src the player's mob, or something else?
In response to Jon88
yes, i also tried usr..
ShakerDeath wrote:
src << ftp(file)
usr << "File \"[file]\" downloaded."


What's with this? You've uploaded the file to one atom, then outputted the success message to another? usr and src aren't always the same thing. Swapping between them midway through something is a bad idea.

Anyway, can you post how download_file() is called? usr probably isn't good in a proc, but src may not be what you want in this case eitehr.
In response to DarkView
Actually, on further inspection it seems to be a BYOND bug. I'm just running a few tests, then I'll post it on the BYOND Bugs forum (on your behalf).
No put usr in proc. Ungh.

Lummox JR
In response to DarkView
hey thx, simple nooby mistake tough -_-...
now it works, i replaced it with usr