var/race = input("What race do you wish to be?") in list("Mage","Warrior")
default_value = "Warrior"
var/char_race = input(src, help_text, prompt_title, default_value) in race
var/mob/new_mob
switch(char_race)
if(race == "Mage")
usr.icon = 'Characters.dmi'
icon_state = "Character 25"
new_mob = new /mob/characters/Mage()
usr.luminosity = 2
new_mob.level = 1
new_mob.maxHP = 10
new_mob.maxMP = 10
new_mob.HP = 10
new_mob.MP = 10
new_mob.race = "Mage"
new_mob.strength = 5
if(race == "Warrior")
usr.icon = 'Characters.dmi'
icon_state = "Character 1"
new_mob = new /mob/characters/Warrior()
new_mob.level = 1
new_mob.maxHP = 25
new_mob.maxMP = 25
new_mob.HP = 5
new_mob.MP = 5
new_mob.race = "Warrior"
new_mob.strength = 10
why does it say at the part [if(race == "Mage")]expected a constant expression?
ID:147188
Aug 20 2004, 12:07 pm
|
|
In response to Mega fart cannon
|
|
i took it out and its still messed up
|
Inside of a switch() you just need to do if("Mage") or if(whatever) for what you want to check.
You can check out how to use any of the built procs by pressing F1 in Dream Maker. |
In response to tenkuu
|
|
thanks
|
I think it's because you put usr.luminosity.