Proc names are treated as verbs, thus trying to call procs with underscores in their names using byondapi results in unspecified behavior.
Numbered Steps to Reproduce Problem:
Code Snippet (if applicable) to Reproduce Problem:
DM:
/world/New()
call_thirdparty()
/obj/proc/proc_with_underscores()
world.log << "proc_with_underscores called"
/proc/call_thirdparty()
var/obj/O = new()
call_ext("byondapi_sample", "byond:callproc")(O)
world.log << "application exit"
C - Byondapi
...
CByondValue result;
ByondValue_Init(&result);
u4c strID = Byond_GetStrId("proc_with_underscores"); // Must be: 'proc with underscores'
printf("Byond_GetStrId = %d\n", strID);
Byond_CallProcByStrId(pSrc, strID, nullptr, 0, &result);
...
Expected Results:
Welcome BYOND! (5.0 Beta Version 515.1610)
Byond_GetStrId = 422
proc_with_underscores called
application exit
Actual Results:
Welcome BYOND! (5.0 Beta Version 515.1610)
Byond_GetStrId = 65535
application exit
When does the problem NOT occur?
Using verb names instead of literal names.
Workarounds:
Replace every underscores with spaces.