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..</<>
ID:172973
![]() Mar 4 2004, 12:19 pm
|
|
![]() Mar 4 2004, 12:20 pm
|
|
Is src the player's mob, or something else?
|
ShakerDeath wrote:
src << ftp(file) 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. |
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).
|