ID:146250
 
Code:
I'll post it if I need it


Problem description:

After a new character hits "Submit" on the creation form, it doesn't close the window, and the proc crashes right there.

I also have a backdated "charactorhandling.dm" file that has the non-HTML login (which I was thinking of switching to anyway so yay for finding it), but it crashes the proc after the player creates thier char also.

I tried following the path of procs in the HTML one, but it made my head spin x_x

Choosing a charactor works fine; but it'd be really nice if they could create charactors too =P It sticks them as close to 1,1,1, as they can get; and that's not where I want them of course, so it'd be nice if you could tell me what I did to my code to override something (I don't think I did anything to the Charactorhandling lib) that shouldn't have been, so I can fix it and get the second have of /mob/Login() back =)
reference << browse(null, options)

That will make the window close, if you named the window when you opened it you'll have to put it in the options the same way when you close it.

I don't know if that will fix your proc crashing or not.
In response to SSJ2GohanDBGT
No, I think the proc is crashing and that's the reason that it doesn't close. I've been using the lib for a long time; the problem just popped up.

Actually, I did decide to follow the proc and maybe it does get all the way through it =/ I don't get any runtimes with my code though so I'll just follow my Login proc maybe. I dunno why the window doesn't close though o_O

EDIT: In my Login() I call the first of these two procs:
mob/proc
gotoworld()
for(var/X in typesof(/mob/buildverbs/verb))
if(!src.verbs.Find[X])
src.verbs += X
for(var/X in src.verbs)
if(istype(X,/mob/buildverbs/verb) && !istype(X,/mob/buildverbs/verb/Use_Custom_Tile) && !istype(X,/mob/buildverbs/verb/Set_Custom_Tile) && !istype(X,/mob/buildverbs/verb/Delete) && !istype(X,/mob/buildverbs/verb/Make_Town))
src.verbs -= X
mob/proc
leaveworld()
for(var/X in src.verbs)
if(istype(X,/mob/buildverbs/verb))
src.verbs -= X
for(var/X in typesof(/mob/buildverbs/verb))
if(!istype(X,/mob/buildverbs/verb/Make_Town))
src.verbs += X


That seems to be where my login crashes, because in my Login I did this:
mob/Login()
..()
//I have unrelated stuff here
src << "BLAH"
src.gotoworld()
src << "BLAH"
//More stuff here

and it only outputs "BLAH" once :)

Edit Pt. 2:
mob/proc
gotoworld()
src << "BLAH"
for(var/X in typesof(/mob/buildverbs/verb))
if(!src.verbs.Find[X])
src.verbs += X
src << "BLAH"
for(var/X in src.verbs)
if(istype(X,/mob/buildverbs/verb) && !istype(X,/mob/buildverbs/verb/Use_Custom_Tile) && !istype(X,/mob/buildverbs/verb/Set_Custom_Tile) && !istype(X,/mob/buildverbs/verb/Delete) && !istype(X,/mob/buildverbs/verb/Make_Town))
src.verbs -= X
src << "BLAH"

This also outputs only one BLAH, and if I comment the first "if" line and untab the line after it, it works o_O Do I need that "if" line in there?

Edit Pt 3:
mob/proc
gotoworld()
for(var/X in typesof(/mob/buildverbs/verb))
//if(!src.verbs.Find[X])
src.verbs += X
for(var/X in src.verbs)
if(istype(X,/mob/buildverbs/verb) && !istype(X,/mob/buildverbs/verb/Use_Custom_Tile) && !istype(X,/mob/buildverbs/verb/Set_Custom_Tile) && !istype(X,/mob/buildverbs/verb/Delete) && !istype(X,/mob/buildverbs/verb/Make_Town))
src.verbs -= X
mob/proc
leaveworld()
for(var/X in src.verbs)
//if(istype(X,/mob/buildverbs/verb))
src.verbs -= X
for(var/X in typesof(/mob/buildverbs/verb))
if(!istype(X,/mob/buildverbs/verb/Make_Town))
src.verbs += X


This works without errors, except that its not what I want it to do; especially the leaveworld() proc =P

Lets start over.

What I want is for the gotoworld() proc to take away all verbs located in /mob/buildverbs/verb, with the exception of these four: Use/Set custom tile, Delete, and Make_Town.

I want the leaveworld() proc to give all the build verbs, except for Make_Town, because obviously we don't want towns within towns =/