I have a verb called set_title and it changes the usr's name t an input of theirs plus hteir name. I dont know if i am making sense, but here is the code:
mob
var
title
mob/verb/set_category()
usr.title=""
usr.title=input("Your Title.","Title")
usr.name="[usr.name] [usr.title]"
It changes their name, but when you change the title to something else it says: title title name. I think its because the name is set to that and it keeps adding the title to the name.
PLEASE HELP,
Air _King
ID:266253
Oct 19 2001, 1:43 pm
|
|
In response to Air Mapster
|
|
Air Mapster wrote:
Air _King wrote: Thanks I was thinking about that, but i thought that it would set the realname to the name with the tite will it? |
In response to Air _King
|
|
Thanks I was thinking about that, but i thought that it would set the realname to the name with the tite will it? Whenever you change their title, set their name to the following: [title] [realname] and it should work fine. |
In response to Spuzzum
|
|
Spuzzum wrote:
Thanks I was thinking about that, but i thought that it would set the realname to the name with the tite will it? No it changes the name to just the title. I think its because the realname= the name and the name is changed to the title and realname, but the realname equals the title so it is just the title |
In response to Air _King
|
|
What I mean is if you set realname only once when they first log in, you will never experience any problems, except possibly with saving, but that's not my area.
src.name = "[title] [realname]" will always produce the result "Sir Alayus Proudmoon" if my name was "Alayus Proudmoon" when I logged in and my title was "Sir". |
In response to Spuzzum
|
|
Spuzzum wrote:
What I mean is if you set realname only once when they first log in, you will never experience any problems, except possibly with saving, but that's not my area. do i have to have the new version of BYOND? |
In response to Air _King
|
|
Air _King wrote:
Spuzzum wrote: Um, no. That same thing would have held true as of version 201. |
In response to Spuzzum
|
|
Spuzzum wrote:
Air _King wrote: Then why wont it work??? Have you tried it? |
In response to Air _King
|
|
Air _King wrote:
Spuzzum wrote: Nevermind, i put usr.name="[usr.title]" usr.name+=" [usr.realname]" |
Yep, you're exactly right. The way I get around this is to make a new mob variable called realname. Then just be sure to initialize it in mob/Login():
mob
var
realname
Login()
// your stuff
src.realname = src.name
. = ..()
Then use realname in place of name in your verb.