mob
Login()
usr.icon_state = input("What gender?") in list ("male","female")
usr.Move(locate(1,1,1)
Im trying ot make it so that i can have six classes to choose from after the male female choice is chosen can someone help me please thanks.
ID:169204
Jul 19 2005, 5:06 pm
|
|
switch(input("Which class would you like to be in?","Class") in list("Class1","Class2","Class3","Class4","Class5","Class6")) |
In response to DeathAwaitsU
|
|
mob
Login() src.icon_state = input("What gender?") in list ("male","female") switch(input("Which class would you like to be in?,"Class") in list("Class1","Class2","Class3","Class4","Class5","Class6")) if("Class1") //if we selected class1 from the options src << "You chose Class 1" if("Class2") //if we selected class2 from the options src << "You chose Class 2" I have this but i get 2 errors |
In response to Thedmof2000
|
|
Possibly because you copied and pasted what I showed you.
Firstly, put code in DM tags like so: <DM> *Code* </DM> Secondly, go back to my post and look at how my indentation is done. |
In response to Thedmof2000
|
|
Thedmof2000 wrote:
mob You spaced it wrong. class one and two should be indented twice or so. so that they're tabsed one more time than the switch() proc. |
In response to Reinhartstar
|
|
The errors i get are
Class: missing comma ',' or right paren ')' |
In response to Thedmof2000
|
|
You need another right bracket on the line with the switch statement.
EDIT: Actually, scratch that. The way it isn't in DM tags screws up reading it. DeathAwaitsU is right, you need to close up the quotation marks. Also, input defaults to usr. The first argument should be src, otherwise you have usr abuse. Change the input to input(src,"What class?","Some Game","Forum Lurker") in list("Forum Lurker","DBZer","Idiot","Republican") (note that those classes are entirely for demonstartion purposes. And republicans can be happy that the "Republican" class is seperate from the "Idiot" class. :P) |
In response to Thedmof2000
|
|
You need a " at the end of the message part of the input.
|
In response to Jp
|
|
allright, here is a login code example like the one you are looking for:
mob/Login() src.icon_state=input("What is your gender?","Gender") in list("male","female","neuter")//I added neuter switch(input("What is your class?") in list("Rein","Hart","Start")) if("Rein") src << "You chose rein!" if("Hart") src << "Yo chose hart!" if("Star") src << "You chose star!" src.loc=locate(1,1,1) <\DM> Also, I may as well bring up now that there is another way to use switch, like so: mob/Login() |
In response to Reinhartstar
|
|
Ok i got that now how to i make it so there is an icon for each class?
|
In response to Reinhartstar
|
|
Ummm... You have usr abuse in that login() proc. Look up input in the reference.
|
In response to Reinhartstar
|
|
you still didn't use the dm tags right.
// this opens the dm tags; everything below it will be shown just like Dream maker. // closes the dm tag; everything below will turn out normal. O-matic |
In response to O-matic
|
|
For the code, I would set [iconname].dmi to the gender, and the class to icon_state=[class]. Though this beginner could be wrong!
|
No put usr in proc.
Additionally, it is always a good thing to put a ..() in in-built procs, so you don't stop them doing things you want them to do.