ID:1866935
 
(See the best response by Kats.)
Code:
atom
var //Let's make this var a atomic varible in case we, for some reason, want to add it to non-mob thing
race = 0

mob
Login() //I will cover the basics here, so prepare for old school mode
if(findtext(usr.key,"Guest",1,6)) //If it's a guest
usr << "<center><font size=+4>Guests not allowed" //we crush him
del usr //Because we don't like guests right?
world << "[usr] has joined the server!" //Yay, you joined the server!
back
usr.name=input("Chose a name","Name") as text //Lets pick a name for you, shall we?
if(!usr.name)//If we don't have a name
goto back

usr.gender1=input("Chose a Gender","Gender")in list("Male","Female","Other")
switch(usr.gender1)
//Lets go back and pick it
//Now, let's pick a Clan!
usr.race=input("Which Race would you like to be?","Race")in list("Hyuuga","Uchiha")
switch(usr.race) //Let's switch trough 2 diferent clans
if("Hyuuga")
usr.verbs+=new/mob/Hyuuga/verb/Kaiten()
//Now let's say you want him yo have ALL hyuuga jutsus, adding so many verbs like this would be pointless
//You would simple add what I added for uchihas
//It would give him all Uchiha verbs instantly
else //Since there is only 2 options, if you aren't hyuuga, you must be uchiha
usr.verbs+=typesof(/mob/Uchiha/verb) //Taraaaammm
//We covered the basics already, so let's put you somewhere, give you a icon and start playing
usr.icon='WereWolf.dmi'
usr.loc=locate(/turf/Start)
world << "[usr] has logged in!"
Logout()
world << "[usr] has logged out!" //Bye bye D:

turf
Start //The place where you begin your journy
Floor //Simple.. .Floor...
icon='Icon.dmi'/*
These are simple defaults for your project.
*/


world
fps = 25 // 25 frames per second
icon_size = 32 // 32x32 icon size by default

view = 6 // show up to 6 tiles outward from center (13x13 view)


// Make objects move 8 pixels per tick when walking

mob
step_size = 8

obj
step_size = 8


loading A New Vampire Dairy. Awaken and Arise.dme
A New Vampire Dairy. Awaken and Arise.dme:22:error: expected expression
A New Vampire Dairy. Awaken and Arise.dmb - 1 error, 0 warnings


I'm guessing "switch(usr.gender1)" expects something.
What I noticed at a quick glance:

As Pirion stated, the switch statement is empty, I know you are planning on adding it on later, but you really should comment out the switch statement as well.

Also, SEVERE usr abuse..
Best response
Okay... cool code but... what are you even trying to do?

You've literally just posted a snippet of god-knows-what and you haven't even told us what line 22 is where your getting the error.

Start by telling us what you're trying to do, because often times not only can we help you fix your erroneous code, but often we can help you try it a better, faster and easier-to-manage way.

As stated by everyone else, you're line: switch(usr.gender1) has no if-statements beneath it, like is expected. I'm going to assert that this isn't the only problem you'll have with this particular source code, but that's a starting point at least. Use the suggestions already mentioned.
This is really not a good way to use goto. You should be using a while() loop here instead.

The usr abuse is also a big problem. Login() isn't very usr-safe because it can be called in situations where usr refers to the player's previous mob (or maybe even a different player entirely, although that's rare). src is what you want there, as it's always correct.
Ok so I got that issue fixed I needed to fix the gender var deffinition idk why but I did.

Now I have a problem of about 64 indentation errors where I see no problem with them.

To answer the question. Above was a login protocol to create a new character with name, race, and gender
I am creating a TVD rp game and am stumbling my way through it as this is my first project
I will post the login code I have so far which now has a savefile system (that I have yet to compile succefully) That should give players the options to load a an old char delete and old char or create a new one and several new races. Any help with it especially on the indentation errors would be appreciated. Also someone explain how to use src cus I tried and failed miserably so I use usr

atom
var //Let's make this var a atomic varible in case we, for some reason, want to add it to non-mob thing
race = 0

mob
Login() //I will cover the basics here, so prepare for old school mode
if(findtext(usr.key,"Guest",1,6)) //If it's a guest
usr << "<center><font size=+4>Guests not allowed" //we crush him
del usr //Because we don't like guests right?
world << "[usr] has joined the server!" //Yay, you joined the server!
client
proc
Load()
var/savefile/load
load = new ("Save Files/[src.mob.ckey]")
load["mob"] >> src.mob
load["x"] >> src.mob.x
load["y"] >> src.mob.y
load["z"] >> src.mob.z

Save()
var/savefile/save
save = new ("Save Files/[src.mob.ckey]")
save["mob"] << src.mob
save["x"] << src.mob.x
save["y"] << src.mob.y
save["z"] << src.mob.z

Del()


if(!src.mob)return
world << "<font color = #000099>Server: <font color = #006DDC>[src.mob.name] has left the server."
src.mob.client.Save()
return ..()
.=..()
New()

back
usr.name=input("Chose a name","Name") as text //Lets pick a name for you, shall we?
if(!usr.name)//If we don't have a name
goto back

usr.gender1=input("Chose a Gender","Gender")in list("Male","Female")
switch(usr.gender1)
//Lets go back and pick it
//Now, let's pick a Clan!
usr.karma=input("Alliance: ???","Character Creation",text)in list("Good","Evil","Neutral")
switch(usr.karma)
if("Good")
src.karma = "Good"
src.karma_rating = 0

if("Evil")
src.karma = "Evil"
src.karma_rating = 0

if("Neutral")
src.karma = "Neutral"
src.karma_rating = 0

usr.race=input("Which Race would you like to be?","Race")in list("Vampire","WereWolf","Angel","Traveller","Neko","Fallen Angel","Witch","Kitsune","Elemental Spirit")
switch(usr.race)
if("Vampire")
usr.verbs+=typesof(/mob/Vampire/verb)
if("Werewolf")
usr.verbs+=typesof(/mob/Werewolf/verb)
if("Angel")
usr.verbs+=typesof(/mob/Angel/verb)
if("Traveller")
usr.verbs+=typesof(/mob/Traveller/verb)
if("Neko")
usr.verbs+=typesof(/mob/Neko/verb)
if("Fallen Angel")
usr.verbs+=typesof(/mob/Fallen_Angel/verb)
if("Witch")
usr.verbs+=typesof(/mob/Witch/verb)
if("Kitsune")
usr.verbs+=typesof(/mob/Kitsune/verb)
if("Elemental Spirit")
usr.verbs+=typesof(/mob/Elemental_Spirit/verb)
usr.icon='WereWolf.dmi'
usr.loc=locate(/turf/Start)
world << "[usr] has logged in!"
Logout()
world << "[usr] has logged out!" //Bye bye D:

turf
Start //The place where you begin your journy
Floor //Simple.. .Floor.

The indentation errors start on line 12 wich is the Client line and continue all the way through
Also if somone could explain why I cant get the map to load fron this I would be grateful
Also would like to say I started coding yesterday
Indentation errors are probably coming just from mixing spaces and tabs indiscriminately. Hit Ctrl+T to see your tabs.

usr abuse is still rampant in this code, and the goto abuse is still there. Also I should warn you that loading x, y, and z individually in Load() won't work unless you're already on the map--you'll want to load those into local vars, and then use locate() to set mob.loc all at once.
Ok so how do I solve my usr abuse idk how to use src
Also thanks for the tip got that indentation error fixed. But its says at the line 14 which is the line under the Load()

Login.dm:14:error: proc definition not allowed inside another proc

@Lummox JR
This should clear a few things up.

mob
var //Let's make this var a atomic varible in case we, for some reason, want to add it to non-mob thing
race = 0
gender1 = ""
karma = ""
karma_rating = 0

mob
Login() //I will cover the basics here, so prepare for old school mode
if(findtext(usr.key,"Guest",1,6)) //If it's a guest
usr << "<center><font size=+4>Guests not allowed" //we crush him
del usr //Because we don't like guests right?
world << "[usr] has joined the server!" //Yay, you joined the server!
switch(alert("Select an action.","Login","New","Load"))
if("New") usr.Create_New()
if("Load") usr.Load()
Logout()
src.Save()
world << "[usr] has logged out!" //Bye bye D:

mob
proc
Load()
var/savefile/load
load = new ("Save Files/[src.ckey]")
load["mob"] >> src
load["x"] >> src.x
load["y"] >> src.y
load["z"] >> src.z

Save()
var/savefile/save
save = new ("Save Files/[src.ckey]")
save["mob"] << src
save["x"] << src.x
save["y"] << src.y
save["z"] << src.z
Create_New()
back
usr.name=input("Chose a name","Name") as text //Lets pick a name for you, shall we?
if(!usr.name) goto back//If we don't have a name

switch(input("Choose a Gender","Gender")in list("Male","Female"))
if("Male") src.gender1 = "Male" // Change to female icon?
if("Female") src.gender1 = "Female" // Change to female icon?
//Lets go back and pick it
//Now, let's pick a Clan!
switch(input("Alliance: ???","Character Creation") in list("Good","Evil","Neutral"))
if("Good"){src.karma = "Good";src.karma_rating = 0}
if("Evil"){src.karma = "Evil";src.karma_rating = 0}
if("Neutral"){src.karma = "Neutral";src.karma_rating = 0}
usr.race=input("Which Race would you like to be?","Race")in list("Vampire","WereWolf","Angel","Traveller","Neko","Fallen Angel","Witch","Kitsune","Elemental Spirit")
switch(usr.race)
if("Vampire") usr.verbs+=typesof(/mob/Vampire/verb)
if("Werewolf") usr.verbs+=typesof(/mob/Werewolf/verb)
if("Angel") usr.verbs+=typesof(/mob/Angel/verb)
if("Traveller") usr.verbs+=typesof(/mob/Traveller/verb)
if("Neko") usr.verbs+=typesof(/mob/Neko/verb)
if("Fallen Angel") usr.verbs+=typesof(/mob/Fallen_Angel/verb)
if("Witch") usr.verbs+=typesof(/mob/Witch/verb)
if("Kitsune") usr.verbs+=typesof(/mob/Kitsune/verb)
if("Elemental Spirit") usr.verbs+=typesof(/mob/Elemental_Spirit/verb)
// Where do you wanted this?? usr.icon='WereWolf.dmi'
usr.loc=locate(/turf/Start)
client
Del()
if(!src.mob)return
world << "<font color = #000099>Server: <font color = #006DDC>[src.mob.name] has left the server."
return ..()
.=..()
New()
world << "[usr] has logged in!"
..()

turf
Start //The place where you begin your journy
Floor //Simple.. .Floor.
In response to SyncWolf
That still doesn't fix a number of those issues:

- usr abuse in Login() and other procs
- Misuse of goto where a while() loop is the way to go
- A useless .=..() line after return ..()
- Loading x,y,z coordinates individually instead of using locate()
I believe also having issues here:

* No sanity on loading a file that exists.
* HTML misformed
* Classes may work better as children of mob
* Karma and Gender1 switch are redundant
* I believe Login()->Load()->Login() will loop due to loading the mob.