ID:140192
 
Code:
mob
verb
finish()
set hidden=1
set category="Skinverbs"
src.client.mob = new_mob
src.oocname=char_name
src.client.mob = new_mob
new_mob.name=char_name
new_mob.loc=locate(216,74,2)
world<<"<b><tt><font color=Green>[usr.name]/[usr.key] has logged in.</font color></tt></b>"
winshow(src,"newcharacter",0)
winshow(src,"main",1)


Problem description:
This verb goes with my pushdown button,after the player has chosen their race,hair,and gender they click the finish button that executes this verb.However nothing happens when the finish button is pressed and i get no runtime errors concerning the message.What coul possibly be the problem?
is the finish verb being called?
In response to Rapmaster
@Rap- you call procs, not verbs. But if you're using a pushbutton, you can attatch it. :P

@OP,
Well, for one, you shouldn't use src in a verb. It's perfectly safe to use usr in a verb.

Let's examine your code.

mob
verb
finish()
set hidden=1 // okay... hiding it...
set category="Skinverbs"
src.client.mob = new_mob // should be usr.client.mob
// and about the above, make sure that it's in the tree as new_mob, and not /mob/new_mob, or else you will get an error.
src.oocname=char_name // okay.
src.client.mob = new_mob // why is this in here twice?
new_mob.name=char_name // you should use usr.name.
new_mob.loc=locate(216,74,2) // again, you should use usr
world<<"<b><tt><font color=Green>[usr.name]/[usr.key] has logged in.</font color></tt></b>"
winshow(src,"newcharacter",0) // winset is your best friend.
winshow(src,"main",1) // ditto.



Here's a good use of winset:

mob/verb/Popup_For_Me()
winset(usr,"my_popup","is-visible=1")
// but to use mulitple commands:
winset(usr,"my_popup","is-visible=1 alpha=250 is-maximized=0")
In response to Kirone
Saying "you shouldn't use src in a verb" is incredibly, mind-bogglingly wrong. src is always a known that can be used.

Additionally, saying "you call procs, not verbs" is also wrong. Verbs are procs that just happen to belong to something's verbs list.

I have no clue what you mean by "and about the above, make sure that it's in the tree as new_mob, and not /mob/new_mob, or else you will get an error", but I'm fairly sure it's wrong. If "new_mob" were a type path, then assigning client.mob to it would be incorrect, you would need an actual new instance of a mob. If it's a variable holding a mob (and it is), then your comment is nonsensical.

You say the "src.oocname=char_name" line is okay, but it isn't. src is going to be destroyed at the end of the proc. It should be new_mob.oocname.

You're right in that the src.client.mob=new_mob line shouldn't be there twice.

You suggest usr.name instead of new_mob.name. Also wrong. What he had was correct. Same with every single instance where you are suggesting usr.

You are suggesting using winset() instead of winshow(). That is wrong. winshow() is the correct proc here.

Also, because you didn't say something specifically contradictory: every instance of src and usr after the src.client.mob line needs to be replaced with new_mob.


Anyway: the most likely issue is that this just isn't being called at all. Also, Kirone shouldn't provide advice if he is going to be systematically wrong on just about every single thing he says.
In response to Rapmaster
yes, of course, unless i am wrong i went to my skin and edited the finish button command with this verb.
idk how this solved my problem but i replaced the words finish with done and everything worked smoothly
mob
verb
done()
set hidden=1
set category="Skinverbs"
new_mob.oocname=char_name
src.client.mob = new_mob
new_mob.name=char_name
new_mob.loc=locate(74,104,1)
world<<"<b><tt><font color=Green>*{{[new_mob.name]}}/{{[new_mob.key]}}* has logged in.</font color></tt></b>"
winshow(new_mob,"newcharacterwin",0)
winshow(new_mob,"main",1)
winshow(new_mob,"loginwin",0)