ID:164120
 
I need a file transfer system from player to player.
it should work so there would be a verb called "send file" and it asks for the name of the recipent then it asks what file to send and the reciever gets a messege of "file transfer from [src], "yes","no"
thank you in advance.
You can use alert() to give a yes/no choice to the recipient. The ftp() proc will send the file to the player.

Example:
mob/verb/send_file(mob/M in world,var/F as file)
if(M&&F)
if(alert(M,"[key] is trying to send the file \"[F]\" to you.",,"Accept","Decline")=="Accept") M<<ftp(F)


Note that such a system through BYOND is hacky, because it first sends the file to be transferred to the server, which then sends it to the recipient. A much better way of doing this would be to directly send the file to the recipient.

-- Data
In response to Android Data
thank you and I would use your advice but can you give me an example of the second way? and instead ok [key] in the last line I'd prefer to use [usr] or [src]
In response to Arochimaro
You cannot do it the second way as far as I know, BYOND does not support it. And as for changing [key] to [usr] or [src], go ahead, nobody is stopping you.
In response to Hiddeknight
You should use [src.name] instead of simply [src], as the latter will produce a "the" prefix if the name begins with a lowercase letter.

As for the method... file transferring shouldn't be done using BYOND, at least not on a large scale.

-- Data
In response to Android Data
I know that. but Data when I tried putting your code in the game and you made it excactly the way I needed it says that there is an Indignition problem.
well I rewrote it using tabs and so and it still says so.