ID:720021
 
Keywords: help, please, rpg, zelda
(See the best response by SuperAntx.)
I am working on a zelda rpg and I don't know what condition I need to use:
mob/player
if mob/Races=
(icon='player.dmi')(icon_state="Hylian")
icon='player.dmi'
icon_state="player"

_________________________________

I am trying to refer to this code(below) in the code above but i'm not sure how.
mob/Races
Human
Hylian
Goron
Gerudo
Zora

mob/var/mob/Races/raceMob
mob/proc/SelectRace()
var/list/raceOptions=list()
for(var/v in typesof(/mob/Races)-/mob/Races) raceOptions+=new v
src.raceMob=input(src,"Select Race","Race") in raceOptions
src<<"You are a [src.raceMob]"

mob/Login()
src.SelectRace()
return ..()
If you don't know how to do conditional statements, I find it hard to believe that you can use loops.

Read over the Guide and Reference and learn some more.
Please read this: http://zilal.byondhome.com/tutorials/zbt.html
And, more importantly, this: http://www.byond.com/docs/guide/

[EDIT]
Also nifty: ID:326846
What exactly are you trying to do here? It appears that you do not have a firm grasp of the DM language. Therefore, you need to provide clear instructions as to what is going on so that we can help you learn from these problems.
if mob/Races=

on this line in the code, it tells me i'm missing a condition even when i put in the race that i wanted to(hylian) so, it's not so much that i don't know, but i think it mabye an error.
As the others said you should read the documentation you can't place an if statement in that location..

Learning is key..
It's very much an error, because the DM language syntax looks nothing like that. That's why I linked you to tutorials so that you can actually learn how DM code is written.
Best response
I think I can see what you're trying to do, but you're doing it in a way more complicated than what you need and maybe more complicated than what you're ready for. What you probably want is an associative list, here's how you would do that.

//RaceIcons is a list of every race and what their icon should be.
var/RaceIcons[] = list("Human" = 'Human.dmi', "Hylian" = 'Hylian.dmi', "Goron" = 'Goron.dmi', "Gerudo" = 'Gerudo.dmi', "Zora" = 'Zora.dmi')

//This is so the player logging in will get to pick a race.
world/mob = /mob/titlescreen

mob/titlescreen
Login()
SelectRace()

Logout()
del(src)

proc
SelectRace()
var/NewRace = input(src, "Choose a race.", "Race Selection") in list ("Human", "Hylian", "Goron", "Gerudo", "Zora")
var/mob/M = new/mob/player
M.icon = RaceIcons[NewRace] //This checks RaceIcons and pulls out the proper icon for whichever race they choose.
client.mob = M //This sets the client's current mob to the new mob.

//Once they've logged in as a player you can greet them and go from there.
mob/player
Login()
src << "Welcome to the game!"
thank you SuperAntx