ID:173886
 
it says i have a invalid expression right here:
mob
Login()
usr << sound('fuel.mid', 1)
..()
I don't see anything wrong with that snippet, so I'd advise looking at the indentation and at the bit just before it.

Lummox JR
if i delete it just says the next thing down, over qnd over, for ever
In response to Lummox JR
there is nothing thats the top thing
turf
grass
icon = 'grass.dmi'
mob
Login()
usr << sound('fuel.mid', 1)
..()

world/mob = /mob/PC //This makes the default mob to login to a PC.
mob/PC/Login() //Let's get started:
density = 0
Move(locate(0,0,0))
src << sound('OEML-1169[2].mid', 1)
var/I = input("What would you like to do?","Logging in:","Continue") in list("Continue","Create New Character") //The input command is made so you can get information from whoever is defined and make the variable defined before the input() that value.
if(I == "Continue") //If the player selected continue...
var/savefile/F = new(client.Import()) //Ok, this is an advanced concept so if you get confused by this, skip it because all you really need to know is the format: savefile is a type like mob, obj, turf, area, atom, and so on are. When you create a new savefile, it is saved in the area specified (in this I do not specify a file path because client.Import does it for me.). client.Import will save it in your \BYOND\users\[Your name here]\Keyinfo\ folder... When I get to client.Export (the second part of this, the actual saving of it in other words) I will explain this some more...
if(F) //If there was a file there...
Read(F) //Read the mob specified in the file. The Read() proc reads all vars in the mob in the savefile (tmp vars are not saved, which I will show you a little later in the grouping procedures section.).
else
usr << "You don't have a character saved!"
I = "Create New Character" //Turn I back to "Create New Character" so when it gets to that part of the proc below, it will make the person create a new one.
if(I == "Create New Character") //If they selected to create a new character or if it couldn't find a savefile which is defined above...
alert("Please give us your character's name. Use something \
original or at least RP like. There is a filtering system on \
this game, so don't try to get by. There are restrictions: \n\
Name cannot be longer than 16 characters \n\
Those with a name in all caps with be booted/banned on sight \n\
Nothing too vulgar, and no numbers either\n\
Those who try to work their way around the system will be punished."
)
Name_Character() //Call this proc which is defined below the Login() proc. This is the same as calling src.Name_Character().
var/C = input("What would you like your character to be?","Class:") in list("male Warrior with pike","Male Knight") //Ditto but with class.
if(C == "male Warrior with pike") //Now, to set stats... Because I defined icon_state in a special way above, I wont need to do anymore defining of it.
icon = 'dwguy.dmi'
Min_Attack = 1 //A warrior's stats:
Max_Attack = 3
Attack_Delay = 4
HP = 30
MAX_HP = 30
Musou = 10
MAX_Musou = 10
Defense = 2
AGI = 3
DEX = 4
EXP_To_Next = 100
if(C == "Male Knight")
icon = 'dwguy.dmi'
Min_Attack = 1 //A wizard's stats:
Max_Attack = 3
Attack_Delay = 4
HP = 25
MAX_HP = 25
Musou = 20
MAX_Musou = 20
Defense = 1
AGI = 2
DEX = 3
EXP_To_Next = 100
bank_wealth = 0
switch(input("Now it is time to pick your dynasty","What dynasty do you belong to?") in list ("Wei", "Wu", "Shu"))
if("Wei")
loc = locate(1,1,1)
if("Wu")
loc = locate(1,1,1)
if("Shu")
loc = locate(1,1,1)
..() //This will call another Login() proc if it is defined somewhere... Which it is down above grouping which we will get to later.
mob/proc/Name_Character() //This is a proc we called above in Login().
var/N = input("What would you like your name to be?","Name:",key) as text //The input() proc can also be used to get text form the player, or number, type, or whatever!
if(N == ""||N == null) //If the player did not put anything...
alert("You need to enter a name!") //Tell him this...
spawn() //This is used to make loops that could or do go on forever not crash. You can also put a delay in 1/10s of a second in the arguments to make it wait before calling the proc that is called after it.
Name_Character() //And make him do it again!
else //If the player did enter something...
if(length(N) < 25) //Here is that old length() proc again. This time it checks to make sure the player's name he defined isn't too long.
name = N //Make that mob's name into what the player wanted it to be.
else
//If it is too long...
alert("Your name was too long!") //Do this stuff again:
spawn()
Name_Character()
mob/proc/Save_Character() //Ok, now back to the saving stuff. The type of savefiles we are using are unique because they are client-side savefiles, meaning you can login to someone elses server and still have your character.
var/savefile/F = new(client.Import()) //This makes a new savefile. The variable F now means the savefile...
Write(F) //The Write proc, like the Read proc will do savefile saving for you. This however, unlike Read(), will save the players mob that he/she has into the savefile specified.
client.Export(F) //This will put that savefile into your \BYOND\users\[Your name here]\Keyinfo\ folder.
src << "[src.name] saved." //Tell the src that it has been saved.

mob/PC/verb/Save() //We gotta let the player do it manually, right?
set category = "Communication"
src.Save_Character() //Save the character with the proc we defined above.
i meen i fixed it
In response to Nave
Could ya use the nifty "edit" button?