ID:800866
 
Keywords: help
(See the best response by Phits.)
Code:
mob/verb
Reset
set category="Commands"
spawn(10)fdel("Save/[M.ckey]")
del(M)


Problem description:
not to sure but i think i almost got it to work anyone know how i'd do the proc on this i tried it like the F1 guide said but no luck :/
Best response
First of all, its a verb. You forgot to add the () at the end of Reset to clarify that. Also, it looks like you have "set category" indented too much and you have not clarified what/whom "M" is. I believe you are looking for something like this:
mob/verb
Reset(var/mob/M)
set category="Commands"
M = usr //Only include this line if you mean to use this on your own character, otherwise leave it out and call the command as Reset(Target)
spawn(10)
fdel("Save/[M.ckey]")
del(M)
In response to Phits (#1)
I Believe it's suppose to be
Reset(mob/M)
In response to The Motto (#2)
The Motto wrote:
I Believe it's suppose to be
> Reset(mob/M)
>

Ya, your right. Got ahead of myself and made a mistake lol.
In response to Phits (#3)
Lol Yea It Happens to the best of us
In response to Phits (#1)
Phits wrote:
First of all, its a verb. You forgot to add the () at the end of Reset to clarify that. Also, it looks like you have "set category" indented too much and you have not clarified what/whom "M" is. I believe you are looking for something like this:
> mob/verb
> Reset(var/mob/M)
> set category="Commands"
> M = usr //Only include this line if you mean to use this on your own character, otherwise leave it out and call the command as Reset(Target)
> spawn(10)
> fdel("Save/[M.ckey]")
> del(M)

If you intend to use this on yourself, M = usr is redundant.
In response to Phits (#1)
Phits wrote:
First of all, its a verb. You forgot to add the () at the end of Reset to clarify that. Also, it looks like you have "set category" indented too much and you have not clarified what/whom "M" is. I believe you are looking for something like this:
> mob/verb
> Reset(var/mob/M)
> set category="Commands"
> M = usr //Only include this line if you mean to use this on your own character, otherwise leave it out and call the command as Reset(Target)
> spawn(10)
> fdel("Save/[M.ckey]")
> del(M)

sorry i tried it but it seems not to work :/
mob/verb
Reset()
set category="Commands"
spawn(10)
fdel("Save/[ckey]")
del(M)
In response to Starz_the_best (#6)
it doesn't work because you need to have
mob/verb
Reset(mob/M in world)
Shes doing it on her own character therefore it doesn't need mob/M
Yeah, seriously just do everything to the usr and you're good to go.

Some other notes.

1.
mob
verb
Stuff(mob/M)

is the same as
mob
verb
Stuff(mob/M in world)


The easiest fix to your code is
mob
verb
Reset()
if(fexists("Saves/[src.key]"))
fdel("Saves/[src.key]")
src.loc = null
In response to Lugia319 (#10)
Lugia319 wrote:
> mob
> verb
> Reset()
> if(fexists("Saves/[src.key]"))
> fdel("Saves/[src.key]")
> src.loc = null
>

I think you meant to do usr, not src.
In this case, usr and src are the same. Because the verb is not displayed to others (no set src in...), the only person who can call the verb is the person who has it, hence why usr == src.

( usr = person who ultimately called the verb
src = the /mob which contains the verb )
Yeah, that's true, in this case. However, there's a good chance that someone will forget that src is the container of the verb and try using it, then wonders in here asking why it doesn't work; whereas if they use usr it is less likely to happen.