ID:1830143
 
Resolved
Calls to input() using "in usr" or "in usr.contents" included a spurious single-quoted string as one of the possible answers.
BYOND Version:507.1281
Operating System:Windows 10 Pro Technical Preview - Build 10049
Web Browser:Firefox 24.7
Applies to:Dream Daemon
Status: Resolved (507.1282)

This issue has been resolved.
Descriptive Problem Summary:When I am just trying to create a simple input list from the objects in the users contents for them to choose from, it's creating an extra option in the list that shouldn't be there.

Numbered Steps to Reproduce Problem:
1.Create a new project.
2.Replace it with the snippet below.
3.Run it and see the top option shows a " instead of the first item, followed by the 2nd item.

Code Snippet (if applicable) to Reproduce Problem:
mob
verb
Input_Test()
var/a=input("What is it that you want to choose?","Input Test")as null|anything in usr
if(a)
world<<"[a] was chosen."
Login()
..()
new /obj(src)

mob
verb
Input_Test()
var/a=input("What is it that you want to choose?","Input Test")as null|anything in usr.contents
if(a)
world<<"[a] was chosen."
Login()
..()
new /obj(src)


Expected Results:Even though it uses "usr" rather than "src" it shouldn't be adding the extra item in the list.

Actual Results:It adds a " to the list of items.

Does the problem occur:
Every time? Or how often?Every Time
In other games?Yes
In other user accounts?Yes
On other computers?Yes

When does the problem NOT occur?When using "src" instead of "usr"

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
Untested.

Workarounds:
Various, look below for other solutions that work.

mob
verb
Input_Test()
var/a=input("What is it that you want to choose?","Input Test")as null|anything in src
if(a)
world<<"[a] was chosen."
Login()
..()
new /obj(src)

mob
verb
Input_Test()
var/a=input("What is it that you want to choose?","Input Test")as null|anything in src.contents
if(a)
world<<"[a] was chosen."
Login()
..()
new /obj(src)

mob
verb
Input_Test()
var/mob/a=usr
var/b=input("What is it that you want to choose?","Input Test")as null|anything in a
if(b)
world<<"[b] was chosen."
Login()
..()
new /obj(src)

mob
verb
Input_Test()
var/mob/a=usr
var/b=input("What is it that you want to choose?","Input Test")as null|anything in a.contents
if(b)
world<<"[b] was chosen."
Login()
..()
new /obj(src)


If anything you expect the last two to fail as well since it's just assigning a variable with the usr variable which fails in the above tests, but it works anyways in these cases.
It would be helpful to know how far back this issue goes.
I'm in the middle of testing on this lummox. Any recommendations on versions I should test with? I'm just going back 1 major build at a time, so using 507 then the first 506, then the first 505 and so on.

I haven't hit the version yet where it was working.
I went as far back as 468.1072, I might be able to go further back but I skipped a few so I didn't have to download every BYOND version there is, and it seems they only have .exe's that far back, I was just re-compiling and running using the zip version for testing and as far back as 468.1072, the error is still present...

I don't really want to do testing where I have to install over my current BYOND version.
Lummox JR changed status to 'Verified'
Lummox JR resolved issue with message:
Calls to input() using "in usr" or "in usr.contents" included a spurious single-quoted string as one of the possible answers.