ID:2377599
 
(See the best response by Nadrew.)
Code:
mob/var
list/moneyex
// confrom= ""
// conto = ""



mob/verb
Ex_money()
set name = "curency exchange"
if(usr.Orch)
moneyex.Add("Orch")
if(usr.Dram)
moneyex.Add("Dram")
if(usr.Elo)
moneyex.Add("Elo")
if(usr.Lygh)
moneyex.Add("Lygh")
if(usr.Jing)
moneyex.Add("Jing")
if(usr.Raan)
moneyex.Add("Ra'an")
if(!moneyex)
_message(usr,"You have no money!")
return
if(moneyex)
switch(input(src, "What kind of Currency?","Currency Type") in list(moneyex))
if("Orch")
_message(usr,"Orch")
return
if("Dram")
_message(usr,"Dram")
return
if("Elo")
_message(usr,"Elo")
return
if("Lygh")
_message(usr,"Lygh")
return
if("Jing")
_message(usr,"Jing")
return
if("Ra'an")
_message(usr,"Ra'an")
return</b>


Problem description:
I'm trying to use a actual list var as the options to choose from so that I can continue a process accordingly. But alas, as I click the verb nothing shows on my screen unless I have nothing set in the list. Then it shows the output text.

Best response
You'd want just 'in moneyex' not 'in list(moneyex)', you're essentially creating a list within a list with that part.
In response to Nadrew
Nadrew wrote:
You'd want just 'in moneyex' not 'in list(moneyex)', you're essentially creating a list within a list with that part.

I'm still having the same issue

mob/var
list/moneyex
// confrom= ""
// conto = ""



mob/verb
Ex_money()
set name = "curency exchange"
if(usr.Orch)
moneyex.Add("Orch")
if(usr.Dram)
moneyex.Add("Dram")
if(usr.Elo)
moneyex.Add("Elo")
if(usr.Lygh)
moneyex.Add("Lygh")
if(usr.Jing)
moneyex.Add("Jing")
if(usr.Raan)
moneyex.Add("Ra'an")
if(!moneyex)
_message(usr,"You have no money!")
return
if(moneyex)
switch(input(src,"What kind of Currency?","Currency Type") in moneyex)
if("Orch")
_message(usr,"Orch")
return
if("Dram")
_message(usr,"Dram")
return
if("Elo")
_message(usr,"Elo")
return
if("Lygh")
_message(usr,"Lygh")
return
if("Jing")
_message(usr,"Jing")
return
if("Ra'an")
_message(usr,"Ra'an")
return


I tried it with this and there's still the same results
You probably want to add some debugging output along the way to see where it's failing, you should also note that if a list only has one item it'll automatically select that item in input().
I got it, I had to make the list var moneyex = list()
mob/var
list/moneyex = list()
// confrom= ""
// conto = ""



mob/verb
Ex_money()
set name = "curency exchange"
if(usr.Orch)
moneyex.Add("Orch")
if(usr.Dram)
moneyex.Add("Dram")
if(usr.Elo)
moneyex.Add("Elo")
if(usr.Lygh)
moneyex.Add("Lygh")
if(usr.Jing)
moneyex.Add("Jing")
if(usr.Raan)
moneyex.Add("Ra'an")
if(!moneyex)
_message(usr,"You have no money!")
return
if(moneyex)
switch(input(src,"What kind of Currency?","Currency Type") in moneyex)
if("Orch")
_message(usr,"Orch")
moneyex.Remove("Orch")
return
if("Dram")
_message(usr,"Dram")
moneyex.Remove("Dram")
return
if("Elo")
_message(usr,"Elo")
moneyex.Remove("Elo")
return
if("Lygh")
_message(usr,"Lygh")
moneyex.Remove("Lygh")
return
if("Jing")
_message(usr,"Jing")
moneyex.Remove("Jing")
return
if("Ra'an")
_message(usr,"Ra'an")
moneyex.Remove("Ra'an")
return