mob/verb
Upload()
set hidden=1
if(connected)
var/file=file("Maps/playerhouses/[src.ckey].txt")
if(!fexists(file))
alert("no file to upload")
return
var/p = world.Export("[addr]:[port]?playerhouse:[src.ckey]",file,1)
if(!p)
alert("upload failed")
return // if world not up
alert("file uploaded")
// SERVER CODE
world/Topic()
if(findtext(Topic,"playerhouse:") == 1)
var/X = world.Import()
var/location = copytext(Topic,13)
if(X)
fcopy(X,"Maps/playerhouses/[location].txt")
return 1
else
return 0
Problem description:
When i run the code i get upload failed.im guessing its the copytext proc, but i dont know any alternate method to parse the player's key variable any pointers?