ID:143878
 

mob/GM/verb/Load(L as file in ("Save Files/[src.ckey]/" & ".sav"))
set category="Admin"
set desc="Loads the selected save file"
client.Load2(L)
client/proc/Load2(var/NEWLOAD)
var/savefile/F = new("Save Files/[NEWLOAD].sav")
F["mob"] >> src.mob
F["x"] >> src.mob.x
F["y"] >> src.mob.y
F["z"] >> src.mob.z




Problem description:

I get about eight errors, then the program freezes. I am tryng to make an admin verb so you can load other profiles, and it must have .sav after it. How would i do this? I could be doing this very wrong, i dont know.


"as file in XYZ" is not valid. You'll need to remove the "in" and everything after it, there's no way to specify a default (or restricted) file path in DM. And, in fact, the file is from the client's computer.

To do what you want, you'll need to just get a text string, then open that.