ID:149791
 
Here is the code that is giving me troubles

switch (input("Hello I am the recruiter for the Codex Eldar if you would like to join us in our conquest for the galaxy please sign the form.", text) in list("Sign the form." , "No id rather not.") )
if("Sign the form.")
usr << "Good choice Here is your uniform and weapon."
set usr.icon = 'Eldar Gaurdian.dmi'
world << "[usr.name] has joined the Codex Eldar!!!"
else
usr << "Okay then get outa here you coward!"


Ive spent all saturday and all sunday night trying to fix it but i cant seem to get it so can you guys help me thanks cya
Vejita99 wrote:
Here is the code that is giving me troubles

switch (input("Hello I am the recruiter for the Codex Eldar if you would like to join us in our conquest for the galaxy please sign the form.", text) in list("Sign the form." , "No id rather not.") )
if("Sign the form.")
usr << "Good choice Here is your uniform and weapon."
set usr.icon = 'Eldar Gaurdian.dmi'
world << "[usr.name] has joined the Codex Eldar!!!"
else
usr << "Okay then get outa here you coward!"

I see two problems right offhand:

  • "set usr.icon" will cause a bug because "set" is reserved for certain things within verbs. You can get rid of the set keyword here.
  • The last line isn't indented far enough.

    One thing you may want to consider is changing input() to alert() in this case, since there are only two choices to pick from. Of course I find both kinda clunky and avoid using them, but in the meantime it makes sense to go with a simple 2-button box over a list. Still, this is a style consideration and won't affect how your code works.

    Lummox JR