ID:154689
 
My issue is i get a "login.dm:23:erroe: missing condition. any suggestions?
world
mob = /mob/create_character
view = 6


mob/Male_Saiyan
icon = 'Goku.dmi'
icon_state = ""
mob/Icer
icon = 'icer.dmi'
icon_state = ""
mob/Female_Saiyan
icon = 'Female.dmi'
icon_state = ""
mob/NPC/Brolly
icon = 'Enemy.dmi'
icon_state = "1"
mob/create_character
var/mob/character
Login()
var/charactername = input("What is your name?","Name")
if charactername = ""
usr <<"your name cant be blank!"
return
switch(input("What Race shal you be?","Race") in list("Saiyan","Drow","Icer"))
if("Saiyan")//if the person chooses this, then what?
character = new /mob/Male_Saiyan()//creating the icon
if("Drow")
character = new /mob/Female_Saiyan()
if("Icer")
character = new /mob/Icer()
character.name = charactername
src.client.mob = character
src.loc=locate(1,1,1)
world << "[usr.key] has just entered '[world.name]'!"
You're missing the ()'s for your if() statement.
In response to Mr. Robert
if(charactername == "")

he's missing the == too, in IF's you need to put two =.
Here is proper syntax...

world
mob = /mob/create_character
view = 6


mob/Male_Saiyan
icon = 'Goku.dmi'
icon_state = ""
mob/Icer
icon = 'icer.dmi'
icon_state = ""
mob/Female_Saiyan
icon = 'Female.dmi'
icon_state = ""
mob/NPC/Brolly
icon = 'Enemy.dmi'
icon_state = "1"
mob/create_character
var/mob/character
Login()
var/charactername = ""
while(!charactername)
charactername = input("What is your name?","Name")
if(!charactername) // same as if(charactername == "") or if(charactername == null) or if(isnull(charactername))
usr <<"your name cant be blank!"
var/character_race = input("What race shall you be?", "Race") in list("Saiyan", "Drow", "Icer")
switch(character_race)
if("Saiyan")//if the person chooses this, then what?
character = new /mob/Male_Saiyan()//creating the icon
if("Drow")
character = new /mob/Female_Saiyan()
if("Icer")
character = new /mob/Icer()
else
alert(usr, "How did you do that???")
del(src)
character.name = charactername
src.client.mob = character
src.loc=locate(1,1,1)
world << "[usr.key] has just entered '[world.name]'!"
In response to FIREking
ThankS. If you couldnt tell, i am new at coding. Lol. Thanks again. I need to now make better punching bags and npcs. my npc is an object (i dont know why i did that) and my punching bag is a mob (i am retarded or something. Can you two help me on that?
In response to Ashs999
obj
punchingbag

mob
NPC


You should read this, http://www.byond.com/docs/guide/
In response to A.T.H.K
ive all ready read that. i am just gertting confused a lot since i dont spend that long coding.
In response to Ashs999
Ashs999 wrote:
ive all ready read that. i am just gertting confused a lot since i dont spend that long coding.

Programming is an activity that will occupy an exponential amount of your time for minimal return depending on many factors. Good programming is the art of doing this activity in such a way that it yields greater return than the amount of effort put in.