ID:2473415
 
Resolved
Some proc calls using the call() proc were misinterpreted, causing named arguments not to work correctly when calling those procs with an arglist().
BYOND Version:512
Operating System:Windows 10 Home 64-bit
Web Browser:Chrome 74.0.3729.169
Applies to:Dream Daemon
Status: Resolved (512.1471)

This issue has been resolved.
Descriptive Problem Summary:
Using call() with a datum not in a variable (such as at a list index) will pass the names of arguments instead of properly using named arguments.

Numbered Steps to Reproduce Problem:
1: run code below
2: look at log

Code Snippet (if applicable) to Reproduce Problem:
client/New()
var/datum/a = new/datum
var/list/datum/l = list(a)
call(/proc/foo)(arglist(list(arg_name = "arg_value")))
call(a, /datum/proc/bar)(arglist(list(arg_name = "arg_value")))
call(new/datum, /datum/proc/bar)(arglist(list(arg_name = "arg_value")))
call(l[1], /datum/proc/bar)(arglist(list(arg_name = "arg_value")))

/proc/foo(arg_name)
world.log << "[arg_name]"

/datum/proc/bar(arg_name)
world.log << "[arg_name]"


Expected Results:
Should print arg_value 4 times
Actual Results:
prints arg_value twice, then arg_name twice

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

When does the problem NOT occur?
As shown, when using a global proc or a datum variable in call()

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 don't know
Workarounds:
Always use a datum variable or global proc with call()
Lummox JR resolved issue with message:
Some proc calls using the call() proc were misinterpreted, causing named arguments not to work correctly when calling those procs with an arglist().