ID:144795
 
Code:
 client/base_num_characters_allowed = 3

client/base_autoload_character = 0
client/base_autosave_character = 1
client/base_autodelete_mob = 0
mob/base_save_location = 1
// client/base_autoload_character = 0
// client/base_autosave_character = 0
// client/base_autodelete_mob = 0
// mob/base_save_location = 0


world/mob = /mob/creating_character

mob/creating_character
base_save_allowed = 0

Login()

src.CreateCharacter()

proc/CreateCharacter()


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)

client.base_ChooseCharacter()
return
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("Trainer", "Pokemon")
help_text = "Which class would you like to be?"
default_value = "Trainer"
var/char_class = input(src, help_text, prompt_title, default_value) in classes



if ("Trainer") var/list/classes/trainer = list("Boy", "Girl")
if ("Boy") var/list/classes/trainer/boy = list("Brandon", "Rival G/S")
if ("Pokemon") var/list/classes/pokemon = list("Bug", "Dark", "Elektric", "Fire", "Ghost", "Grass", "Ground", "Psychic", "Water",)
if ("Bug") var/list/classes/pokemon/Bug = list("Ledyba", "Oddish", "Scyther",)
if ("Dark") var/list/classes/pokemon/Dark = list("Houndour")
if ("Elektric") var/list/classes/pokemon/Elektric = list("Pikachu", "Mareep",)
if ("Fire") var/list/classes/pokemon/Fire = list("Charmander", )
if ("Ghost") var/list/classes/pokemon/Ghost = list("Gastly", "Misdreavus",)
if ("Grass") var/list/classes/pokemon/Grass = list("Bulbasaur", "Oddish",)
if ("Ground") var/list/classes/pokemon/Ground = list("Sandshrew", "Cubone", "Geodude",)
if ("Psychic") var/list/classes/pokemon/Psychic = list("Abra", "Drowzee",)
if ("Water") var/list/classes/pokemon/Water = list("Squirtle", "Psyduck", "Magikarp",)


new_mob = new /mob/Scyther()


new_mob name = char_name


src.client.mob = new_mob

var/turf/first_location = locate(1, 1, 1)
new_mob.Move(first_location)
del(src)

mob
Login()
..()

sample_report()


verb
add_save_verb()

src.verbs += /mob/proc/save_me

remove_save_verb()
src.verbs -= /mob/proc/save_me

proc
sample_report()
src << "<BR><BR>"
src << "\blue You are [name]."
src << "\blue Your class is [type]."

save_me()
// This demonstrates verb saving and how to manually save the mob whenever you want..
// This proc gets added and saved as a verb only if add_verb is called by the player.
src.client.base_SaveMob()
src << "\red You have been saved


Problem description:
I cant get the pokemon types list working and the trainer sex list.

You have some bogus code here:
var/char_name = input(src, help_text, prompt_title, default_value) as null|text
if (!char_name)
client.base_ChooseCharacter()
return
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

Now obviously you haven't tried compiling this, because that "the name." line and a few others would give you errors out the wazoo. Nevertheless, you have other errors that need fixing.

The worst problem is that CreateCharacter() is calling itself. It's doing so without using spawn(), so it will keep piling up in the stack until it explodes. Also, a simple while() loop would work better.
var/char_name
do
char_name = input(src, help_text, prompt_title, default_value) as null|text
if (!client) return // fail if client logged out
if (!char_name)
client.base_ChooseCharacter()
return
if (ckey(char_name) in client.base_CharacterNames())
alert(src, "You already have a character named that! Please choose another name.")
if (!client) return // fail if client logged out
char_name = null
while(!char_name)

Lummox JR