View/Edit #13:@file

Switch to edit mode.

Name(s): @file
1:  if (player != this)
2:    return $msg:mtell("huh")
3:  endif
4:  set_task_perms(player)
5:  if (length(args) != 1 || !(spec = $code_utils:parse_fileref(args[1])))
6:    return player:tell("Usage:  @file <object>!<file-name>")
7:  endif
8:  object = player:my_match_object(spec[1])
9:  name = $string_utils:lowercase(spec[2])
10: if ($command_utils:object_match_failed(object, spec[1]))
11: elseif (!$perm_utils:controls(player, object))
12:   player:tell(E_PERM)
13: elseif (object:fileexists(name))
14:   player:tell("File ", object, "!", name, " already exists.")
15: else
16:   object:filewrite(name, {})
17:   player:tell("Empty file created.  Use @notedit to edit it.")
18: endif
19: "Last modified by Dax (#789) on Thu Nov  8 11:38:30 2001 MST."

Verb arguments: any none none
Verb perms: Readable NOT-Debug
Verb owned by: Dax (#789)

You are not logged in.

[home | help | who | search | setup | code]