ID:2642613
 
Resolved
The ?. and ?: operators were compiled incorrectly when used in left-hand-side expressions, which resulted in weird errors at runtime.
BYOND Version:513
Operating System:Windows 10 Home 64-bit
Web Browser:Firefox 83.0
Applies to:Dream Maker
Status: Resolved (513.1539)

This issue has been resolved.
Descriptive Problem Summary:
Started appearing in 1538 after what I assume was the fix to 1537's ?. issue.
It seems that when you do
A?.B = C.D
for some reason the variable B is accessed on C which usually results in a runtime error because B is not defined on C.

Numbered Steps to Reproduce Problem:
1.) Compile code below
2.) Run the verb

Code Snippet (if applicable) to Reproduce Problem:
/mob/var/some_var

/mob/verb/test_bug()
src?.some_var = src.loc.name


Expected Results:
No runtime.

Actual Results:
runtime error: Undefined variable /turf/var/some_var

Does the problem occur:
Every time? Or how often? Every time
In other games? N/A
In other user accounts? N/A
On other computers? N/a

When does the problem NOT occur?
If the expression is just A?.B = C .
If the expression is not a ?. assignment..

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

Workarounds:
🤷‍♀️
Lummox JR resolved issue with message:
The ?. and ?: operators were compiled incorrectly when used in left-hand-side expressions, which resulted in weird errors at runtime.