ID:146645
 
Code:
        new_char
icon = 'new.bmp'
Click()
usr.name = input("Name","Your Name",usr.name)
usr << "Please select a class."
usr.class = input("Select a class from the list of possible trades","Class") in list("Shooter","Mage","Farmer","Hunter","Assassin","Chaos Knight")
if("Shooter")
usr.str = 2
usr.sta = 1
usr.def = 1
usr.mana = 0
usr.chaos = 0
usr.class = "shooter"
usr.acc = 3
usr.int = 2
usr.loc = /turf/charspaw/charspaw
if("Mage")
usr.str = 1
usr.sta = 2
usr.def = 1
usr.mana = 10
usr.chaos = 0
usr.class = "mage"
usr.acc = 2
usr.int = 3
usr.loc = /turf/charspaw/charspaw
if("Farmer")
usr.str = 3
usr.sta = 2
usr.def = 1
usr.mana = 0
usr.chaos = 0
usr.class = "farmer"
usr.acc = 3
usr.int = 3
usr.loc = /turf/charspaw/charspaw
if("Hunter")
usr.str = 3
usr.sta = 1
usr.def = 3
usr.mana = 0
usr.chaos = 0
usr.class = "farmer"
usr.acc = 3
usr.int = 1
usr.loc = /turf/charspaw/charspaw
if("Assassin")
usr.str = 1
usr.sta = 3
usr.def = 1
usr.class = "Assassin"
usr.acc = 3
usr.int = 3
usr.loc = /turf/charspaw/charspaw
if("Chaos Knight")
usr.str = 3
usr.sta = 3
usr.def = 3
usr.chaos = 10
usr.class = "Chaos Knight"
usr.acc = 1
usr.int = 1
usr.loc = /turf/charspaw/charspaw
usr.mo = 100
..()


Problem description:
The above is code from a turf's Click() proc in my game. The problem is that, when it reaches the point where the game should send the player to /turf/charspaw/charspaw, the game black-screens (similar to when there's no ..() in /mob/Login.)

I'm not sure where the problem originates, because the rest works, and there is no warning/error messages. I am positive that the turf is placed on the map, and that there are no duplicate instances of it.

As for why the "usr.loc = /turf/charspaw/charspaw" repeats itself for each option, I tried placing it where under usr.mo = 100, and the problem occured there, as well.
You need to do usr.loc = locate(/turf/charspaw/charspaw), which I assume is the path of the turf.

You should be fine placing it under usr.mo.