ID:263232
 
Code:
world/mob = /mob/NotLogged //default type for people logging in
mob/NotLogged
invisibility=0
mob
Login()
src.loc = locate(48,51,2)
..()
mob/create_character
var/mob/characters
obj/Start//makes the name
icon = 'archangel2.bmp'//the pic file
Click()//you click it it'll do the following below
char_name
var/user_name = input("What would you like your name to be? Please choose a Role Playing name. That means no numbers and also no HTML in your name.","Character Creation",usr.key)as text
if(!user_name)
goto char_name
if(lentext(user_name) > 20)
src <<"Name too long."
goto char_name
for(var/N in un_wanted_names && html)
if(findtext(user_name,N))
alert("That name is not allowed.","Name")
goto char_name
else
src.name = html_encode(user_name)
world<<"<font size = 2><b><font color=blue>[name] has logged in!"
switch(input("Please choose a Gender.","Gender") in list("Male","Female"))
if("Male")
switch(input("What Class would you like to be?","Class")as null|anything in list("Earth","Fire","Wind","Water","Tunder","Grass"))
if("Earth")character=new/mob/characters/Male/Earth()
if("Fire")character=new/mob/characters/Male/Fire()
if("Wind")character=new/mob/characters/Male/Wind()
if("Water")character=new/mob/characters/Male/Water()
if("Tunder")character=new/mob/characters/Male/Tunder()
if("Grass")character=new/mob/characters/Male/Grass()
else
del(src)
if("Female")
switch(input("What Class would you like to be?","Class")in list("Fire","Water"))
if("Fire")character=new/mob/characters/Female/Fire()
if("Water")character=new/mob/characters/Female/Water()
else
del(src)
..()
usr.loc=locate(9,9,1)

mob/characters
Male
Fire
Element = "Fire"
icon='Fire.dmi'
icon_state=""
Earth
icon='Earth.dmi'
icon_state=""
Water
icon='Water.dmi'
icon_state=""
Tunder
icon='Lighting.dmi'
icon_state=""
Grass
icon='Grass.dmi'
icon_state=""
Wind
icon='Wind.dmi'
icon_state=""
Female
Fire
icon='Arch.dmi'
icon_state="Stuff"
Water
icon='Arch.dmi'
icon_state="Player"
var/list/html = list("<",">","font","size")
var
list
un_wanted_names = list("") //my key is there just for a test
name_length
maximum_name_length_amount = 20 //set length
character = 0


Problem description:

The problem is that none of the info you put in gose on to the person you don't get your icon, name, Element, and the boost please show me what i did wrong.
Well, I don't see a character var defined anywhere, but if you want to have the changes effecting the character var effect your player, then you'll probably want to set the player's mob to the character. So, set the player's client.mob = character.
In response to Foomer
no that dosen't work
        if(!user_name)
goto char_name
if(lentext(user_name) > 20)
src <<"Name too long."
goto char_name
for(var/N in un_wanted_names && html)
if(findtext(user_name,N))
alert("That name is not allowed.","Name")
goto char_name
else
src.name = html_encode(user_name)

Wowow. 3 things, 3 things wrong. Never bother even looking at 'goto' when you've just started programming. It's not useful for anything you'll be doing soon. Instead, use while()

Also, that for loop, why can't you just use html_encode to begin with? Make them look like a fool if their name is weird because they tried to use html. :)
var/char_name
while(!char_name) // While they don't have a name
char_name=html_encode(input(src,"What is your name?") as text)
if(length(char_name)>20) {src<<"Please shorten your name.";char_name=null} // Reset char_name back to null so the loop will restart.
name=char_name // Set src's name to the char name after the loop is finished.



world<<"<font size = 2><b><font color=blue>[name] has logged in!"

HTML teachers will smite you in this. First off, you've got 2 font tags. You can combine them into one! And you've got those nasty little spaces in between <code>size = 2</code>. They never do any good. Also, close your html.
world<<"<font size=2 color=blue><b>[name] has logged in!</b></font>"



        switch(input("Please choose a Gender.","Gender") in list("Male","Female"))
if("Male")
switch(input("What Class would you like to be?","Class")as null|anything in list("Earth","Fire","Wind","Water","Tunder","Grass"))
if("Earth")character=new/mob/characters/Male/Earth()
if("Fire")character=new/mob/characters/Male/Fire()
if("Wind")character=new/mob/characters/Male/Wind()
if("Water")character=new/mob/characters/Male/Water()
if("Tunder")character=new/mob/characters/Male/Tunder()
if("Grass")character=new/mob/characters/Male/Grass()
else
del(src)
if("Female")
switch(input("What Class would you like to be?","Class")in list("Fire","Water"))
if("Fire")character=new/mob/characters/Female/Fire()
if("Water")character=new/mob/characters/Female/Water()
else
del(src)
..()


Well, this might be a bit confusing for you, but I'm going to try and explain anyhow.
First off, there is 'usr' abuse in there. Yep, it might not be noticable, but there is. input("What class"), ack! usr abuse. Where? Look up input() in the reference (F1 button inside DreamMaker) (or check my example).

var/thegender=input(src,"What gender do you wish to be?") in list("Male","Female") // I'm using "thegender" plainly because "gender" is a build-in variable.
//Notice how I'm using input, not switch. You'll see why in a mo'.
var/class=input(src,"What class do you want to be?") in list("Pie","Cookie","Peanut") // Another input! Witty. Now what?
var/path=text2path("/mob/characters/[thegender]/[class]")
// I'll explain this below , it's quite simple.
character=new path

text2path() is godly. It gets rid of many if()'s and switch()'s where you don't want them. Or they look ugly, anyway.
As I'm in a text-string, I can use [var]. So I can just put both the gender, and the class in one variable, and then make one. Here's what happens;
var/path=text2path("/mob/characters/[thegender]/[class]")
world<<path // Will ouput for example "/mob/characters/Male/Fire"
//though that's in a text string, it won't be. That's just DreamMaker.


usr.loc=locate(9,9,1)

I'll give you 3 guesses what's wrong with this line.


And now we come to your problem. I don't see how you defined "character", so I'll do it like I would, but I noticed you're using both "src" and "character" to change variable values. For example, you're using 'src' for "name", and then using "character" for the mob. This will result in data not being transferred, as the name will be editted to the mob they've just picked. So they'll be called Water, Fire, ...

To fix this, change the name of "character" in the almost-end of the code, instead of directly after the switch() loop. Also, the reason nothing is saved is because you're loading mob, and then not transferring it to the client in any way. Here's how it's done. (Could be wrong somewhere, didn't program for a while)
var/mob/character
...
character=new/mob/biscuit
character.name=char_name // Now the "character" won't be named biscuit!
src.client.mob=character // Set the client's mob to the one we've just created
del(src) // Delete the mob which the client has just abandoned