ID:261603
 
Why is it that when I use the code switch(input(black,"[red] has asked you to play","Play","Yes")in list("Yes","No")) it won't goto the black var.
DBZ Kidd wrote:
Why is it that when I use the code switch(input(black,"[red] has asked you to play","Play","Yes")in list("Yes","No")) it won't goto the black var.

If you want to assign a result of an input(), then you need to assign it with the '=' operator like so:

black = input("[red] has asked you to play") in list("Yes","No")

This will assign either "Yes" or "No" (depending on which is chosen) to the 'black' var.

Hope that helps.
In response to Malver
Nooo the black var is a person, and if you change its value it wont be a person anymore :P
In response to DBZ Kidd
I'm not sure what you are trying to do but, maybe this may help.

mob/verb/Invite(var/mob/M in world)
var/chioce = input("[usr] has invited you to play!") in list ("Yes","No")
if(chioce == "Yes")
M.loc = usr.loc
usr<<"[M] has decided to join you!"
if(chioce == "No")
M<<"You rejected [usr] invitation!"
usr<<"[M] has rejected your invitation!"

I'm not sure if this is what you were trying to do, but I thought I might try to help.

Creator of R.P.D.
Rifthaven