turf
login
Click()
src.CreateCharacter()
mob/creating_character
base_save_allowed = 0 // If player quits before choosing, don't want to save this mob.
Login()
usr.loc=locate(7,7,2)
//spawn()
//src.CreateCharacter()
proc/CreateCharacter()
// In this case, the code creates a /mob/human or /mob/ogre with the specified attributes.
// Get the character information from them. (You would probably want to do with this a browser page.)
var/prompt_title = "New Character"
var/help_text = "What do you want to name the character?"
var/default_value = key
var/char_name = input(src, help_text, prompt_title, default_value) as null|text
if (!char_name)
// Guess they don't want to create a new character after all, so send them to choose a character.
client.base_ChooseCharacter()
return
// Make sure there isn't already a character named that.
// Character names are stored as ckey, so get the ckey version of the name.
var/ckey_name = ckey(char_name)
var/list/characters = client.base_CharacterNames()
if (characters.Find(ckey_name))
alert("You already have a character named that! Please choose another name.")
src.CreateCharacter()
return
var/list/classes = list("Hero")
help_text = "Which class would you like to be?"
var/char_class = input(src, help_text, prompt_title) in classes
var/mob/new_mob
switch(char_class)
if("Hero")
switch(input("Please Pick Your Race.","Character Creation")in list("Saiyan","Human"))
if("Saiyan")
new_mob = new /mob/character/saiyan()
usr.loc=locate(79,7,1)
class ="Saiyan"
if("Human")
new_mob = new /mob/character/human()
usr.loc=locate(79,7,1)
class ="Human"
new_mob.name = char_name
src.client.mob = new_mob
usr.loc=locate(79,7,1)
del(src)
mob
Login()
usr.loc=locate(79,7,1)
..()
Problem description:I am trying to make it so when they click the turf it starts up the create char proc, but when i do that i get this earror
DB The Next Generation.dm:107:error:src.CreateCharacter:undefined proc
How cna i fix this?
Can you guess what src is in this situation?