ID:1584782
 
Not a bug
BYOND Version:506
Operating System:Windows 7 Home Premium 64-bit
Web Browser:Firefox 29.0
Applies to:DM Language
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:
The 'step()' procedure strangely returns a value of 0 when a movement happens, and '' (null) when it fails.

Numbered Steps to Reproduce Problem: Try grabbing the value returned by step(mob,dir) and output it.

Code Snippet (if applicable) to Reproduce Problem:
        movement()
if(checkStun())
return 0
if(mob.Dashing)
. = step(mob,LastDir)

else if(!Dir) . = step(mob,LastDir)
else
. = step(mob,Dir)
LastDir=Dir
if(. && !(Loop.TimeOut))Loop.TimeOut = initial(Loop.TimeOut)


Expected Results: movement() to return 1 on movement.

Actual Results: movement() returning 0 on movement, '' or null otherwise.

Does the problem occur:
Every time? Or how often? Everytime
In other games? Not verified.
In other user accounts? Totally sure.
On other computers? Totally sure.

When does the problem NOT occur? Never because it never returned 1 once.

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 am not sure of this one.

Workarounds: To check if . is null; '. = !(isnull(.))' after termination of the procedure.
        movement()
if(checkStun())
return 0
if(mob.Dashing)
. = step(mob,LastDir)

else if(!Dir) . = step(mob,LastDir)
else
. = step(mob,Dir)
LastDir=Dir

. = !(isnull(.)) // Workaround

if(. && !(Loop.TimeOut))Loop.TimeOut = initial(Loop.TimeOut)

Did you override Move() without returning the value of ..()?
I can't verify this issue. Are you able to reproduce it on a blank project?
Ops, it returns true on a blank project...

And no, all my Move() overwrites are calling ..() at the very beginning.
In response to Fushimi
Calling isn't as important as actually returning the value.

// wrong:
mob/Move()
..()
blah blah

// right:
mob/Move()
blah blah
return ..()

mob/Move()
blah blah
. = ..()
blah blah
Ter13 resolved issue (Not a bug)
No way I skipped this, lol.

Indeed I was returning nothing.