ID:171025
 
Ok, I have a problem.
I made my own Character Handling "System" (It can load a character, Create a new character, and save the characters.)
I made a new mob called "New".
I set the "New" mob to call my createchar proc at Login()(because I don't have an actual select a character proc yet.)
I set world/mob = /mob/New. Everything goes, it relocates to 1,1,1. But then it sends the world a message saying that I logged out, and it doesn't locate my mob on the map, although it does set my view to the startpoint, any idea why?

My Create Character code:

mob
proc
NewChar()
Start:
var/char_name = input ("What would you like your character name to be?")as null|text
if(!char_name)
src << "I am sorry, but you need to enter a character name."
goto Start:
else
alert("Are you sure you want your character to be named [char_name]?", "Confirm","Yes","No")
if("Yes")
src.client.mob = /mob/Player
loc = locate(1,1,1)
SaveChar(char_name)
if("No")
return

Lenox wrote:
src.client.mob = /mob/Player
loc = locate(1,1,1)

You are setting mob to a type path, not an instance. Then you change the location of the mob/New instead of the client's new mob.

Replace those lines with this:
src.client.mob = new/mob/Player(locate(1,1,1))

In response to Shadowdarke
WOOOOT!!!!!!!!! Thank you, it works now ^_^. Now I just need to have it give me my admin verbs. ^_^
In response to Lenox
If your hinting for that too..



mob
admin
verb
//admin verbs here


mob
Login()
..()
if(src.key == "Lenox")
src.verbs +=typesof(/mob/admin/verb)-/mob/admin/verb


That should do it!
In response to XxDohxX
XxDohxX wrote:
> mob
> Login()
> ..()
> if(src.key == "Lenox")
> src.verbs +=typesof(/mob/admin/verb)-/mob/admin/verb
>

That should do it!

Actually, all you need is
mob
Login()
..()
if(src.key == "Lenox")
src.verbs +=typesof(/mob/admin/verb)

mob/admin/verb is just a type path, no matter how you look at it. Trying to add it to something just returns null, so you don't need the "-/mob/admin/verb/ line" :)
In response to XxDohxX
Ah, I got it, thanks anyways :P
I wasn't hinting, but the reason I didn't get the verbs is because Nadrew's Administration System gave the verbs to the old mob, but I deleted that mob, so I didn't get the admin verbs, so I had to set up my own admincheck :P
In response to Wizkidd0123
Hey, one more question. I'm trying to make a FindChar() proc like deadrons, but different. I want it to read the list(src.Char_Names) that I defined as mob/var/list/Char_Names = list() and if it finds a name, return it. Any way to do that?
In response to Lenox
Lenox wrote:
Hey, one more question. I'm trying to make a FindChar() proc like deadrons, but different. I want it to read the list(src.Char_Names) that I defined as mob/var/list/Char_Names = list() and if it finds a name, return it. Any way to do that?

Sure, Lenox:

mob/proc/FindChar(cName as Text)
if(Char_Names&&Char_Names.Find("[cName]")) return "[cName]"


So, in that proc, we're saying that if Char_Names exists, and if it can find cName, then return cName.
In response to Wizkidd0123
Aiight, thanks m8. If this menu works, then I've created my OWN Character handling system :P (The only thing I did was look at deadron's to see how he STARTED it out, but the actual code was mine of everything except the ChooseChar() proc which I got here ^_^)