You cannot pass null explicitly in a proc-call with default values on it's arguments. Attempting to do so will result in the null being discarded (regardless of argument specification method) and the default value taking over it.
This is a problem because it means that there is no way to tell if a proc was called with null as an explicit argument vs a proc called with no arguments (or no value specified for the argument in question)
Numbered Steps to Reproduce Problem:
1. Make a proc that has an argument with a default value, `bug(z = 1)`.
2. Call the proc however you want with the argument `null`.
3. Observe that accessing `z` in the proc will always return `1`.
Code Snippet (if applicable) to Reproduce Problem:
/proc/bug(z = 1)
world << "Actual result: [isnull(z) ? "null" : z]"
/client/verb/test()
world << "T1: Expected result: null"
bug(null) // "Actual result: 1"
world << "T2: Expected result: null"
bug(z = null) // "Actual result: 1"
world << "T3: Expected result: null"
call(/proc/bug)(null) // "Actual result: 1"
Expected Results:
Explicitly specified nulls would override default arguments.
Actual Results:
Default arguments override explicitly specified nulls.
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?
Unknown. I couldn't find any way to make it not occur.
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.) I tested the last version of every major build from 512.1422 to 508.1299. This bug is present in all of them.
Workarounds:
None known.