ID:94164
 
Not a bug
BYOND Version:464
Operating System:Windows 7 Home Premium 64-bit
Web Browser:Chrome 4.1.249.1045
Applies to:Dream Maker
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:
call cannot call proc's or verb's with underscores in the name
Numbered Steps to Reproduce Problem:
1. Create any verb or proc with an underscore in the name
2. Create a verb that calls the previous proc/verb with call
Code Snippet (if applicable) to Reproduce Problem:
mob
verb/runtime_error()
call(src,"noerror")()
call(src,"i_am_error")()
proc
noerror()
usr << "this doesn't cause a runtime error"
i_am_error()
usr << "runtime error"


Expected Results:
The proc or verb should be found and called at runtime
Actual Results:
Any proc or verb with an underscore in the name is not found
Does the problem occur:
Every time? Or how often?
Every time
In other games?
In other user accounts?
On other computers?

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:

Underscores in verbs & procs are converted to spaces in the default name. So the default name for the proc i_am_error is "i am error", and your code will work if you use:
call(src,"i am error")()


If you want to use the literal name (with underscores), you can force this via
proc/i_am_error()
set name = "i_am_error"
...

In retrospect, this behavior isn't ideal (since it adds an unnecessary level of confusion). However, this parsing decision was made a long time ago, before the call() procedure even existed and it made more sense to have verbs with spaces than underscores.