ID:786749
 
Keywords: help
(See the best response by Albro1.)
Code:
    switch(input("What spieces do you want to be?") in list ("Pokemon","Trainer",))
if("Trainer")
usr.loc = locate(9,5,7)
usr.spieces = "Trainer"
if("Pokemon")
usr.loc = locate(0,3,7)
usr.spieces = "Pokemon"</b>


Problem description:

it keeps saying login.dm:25:error: usr.spieces: undefined var i've tried to define the var but it being mean and goes like >D and i go >O then i watch gundam seed can anyone help?
when i do the gender it works perfectly :/
mob/var
spieces = "None"
mob/var/spieces=""
It Is a Mob var so you Have to use mob/var, and you cannot do spieces = 0 , you need the spieces = "" To let the code know that the var is going to be containing words
Or you can just do:
mob/var/species

Does the same thing, with less typing.
thanks guys!
No Problem
so i tried it out i didnt get the error which im happy about but... is there a way to fix this?
runtime error: bad gender
proc name: Login (/mob/Login)
usr: DragonoidLTD (/mob)
src: DragonoidLTD (/mob)
call stack:
DragonoidLTD (/mob): Login()

Don't modify a mob's built in gender. It can only be Male, Female, or Neuter.
i have male and female as a selection
Are they lower-case?
In response to DragonoidLTD
DragonoidLTD wrote:
i have male and female as a selection

Gender is a built in variable which is why you are getting that specific error.

To bypass that make another variable
mob/var/player_gender
In response to A.T.H.K
Best response
A.T.H.K wrote:
DragonoidLTD wrote:
i have male and female as a selection

Gender is a built in variable which is why you are getting that specific error.

To bypass that make another variable
> mob/var/player_gender
>


It isn't a read-only variable. You can modify it. It just has to be lower-case. And I was wrong, it can also be plural.

"male"
"female"
"neuter"
"plural"
In response to Albro1
Albro1 wrote:
A.T.H.K wrote:
DragonoidLTD wrote:
i have male and female as a selection

Gender is a built in variable which is why you are getting that specific error.

To bypass that make another variable
> > mob/var/player_gender
> >

It isn't a read-only variable. You can modify it. It just has to be lower-case. And I was wrong, it can also be plural.

"male"
"female"
"neuter"
"plural"

Learn something new everyday :)
thanks again guys you two are a great help.
and no they were uper cased in the spot i did

usr.gender = "Male"
it was working before when i had
usr.gender = "male" i think because thats what i had at the start when it was working.