ID:2627643
 
Not a bug
BYOND Version:513.1536
Operating System:Windows 10 Pro 64-bit
Web Browser:Chrome 86.0.4240.99
Applies to:DM Language
Status: Not a bug

This is not a bug. It may be an incorrect use of syntax or a limitation in the software. For further discussion on the matter, please consult the BYOND forums.
Descriptive Problem Summary:
Winsetting an image with or without a space on its name works.
Winsetting an image with a space on its name throught an associative list, doesn't work.

Give out the error:
winset: Parameter window.element.SPACE.png not found.


Numbered Steps to Reproduce Problem:
1 - Open DM.
2 - Create or Have a Skin file with an element
3 - Try winsetting an image w space on the name to the element throught an associative list

Code Snippet (if applicable) to Reproduce Problem:
winset(client,"window.element","image='ICONNOSPACE.png'")//works
winset(client,"window.element","image='ICON SPACE.png'")//works

var/list/TestList=list("Image"='ICONNOSPACE.png')
winset(client,"window.element","image=[TestList["Image"]]")//works
winset(client,"window.element","image=\"[TestList["Image"]]\"")//works
winset(client,"window.element", list("image" = TestList["Image"]))//works
winset(client,"window.element", "image=\ref[fcopy_rsc(TestList["Image"])]")//works

var/list/TestList=list("Image"='ICON SPACE.png')
######
winset(client,"window.element","image=[TestList["Image"]]")//doesn't work
######
winset(client,"window.element","image=\"[TestList["Image"]]\"")//works
winset(client,"window.element", list("image" = TestList["Image"]))//works
winset(client,"window.element", "image=\ref[fcopy_rsc(TestList["Image"])]")//works


Expected Results:
For the code line above that doesn't work to work

Actual Results:
The code lines above don't work

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?
Never

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.)

Workarounds:
Don't use space on the name of the files or use one of the alternative lines on the example code.

///
I thought that there were more to it than this; Turns out I was being silly. I understand this not working. The topic can be deleted/closed if there is no fix to this.
Params can take an associative list directly now, rather than dealing with messy strings. Have you tried that?
Lummox JR resolved issue (Not a bug)
There's no bug here. This is just a failure to encode the data correctly. Hence why the \ref cases work as expected, and why the associative list format for winset() also works.

Login to reply.