ID:82121
 
Not a bug
BYOND Version:454
Operating System:Windows XP Pro
Web Browser:Firefox 3.5.3
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:
I defined world mob as /mob/player, though when I try to call player procs in Click() it'll say it's an undefined proc.

I've searched around and I don't believe this is intended behaviour, but if it is, I'm sorry for the fake report.

Numbered Steps to Reproduce Problem:
Define world/mob as /mob/player for example, make a proc for mob/player, and try to call that proc in area/Click() for example.

Code Snippet (if applicable) to Reproduce Problem:
area
Load
Click()
usr.LoadChar()
mob/player/proc/LoadChar()
world << "testing"

world/mob = /mob/player


Expected Results:
It won't result on an undefined proc error.

Actual Results:
It will compile without any issues.

Does the problem occur:
Every time? Or how often? Everytime.
In other user accounts? Yes.
On other computers? Yes.

Workarounds:
area
Load
Click()
var/mob/player/P = usr
P.LoadChar()
mob/player/proc/LoadChar()
world << "testing"

world/mob = /mob/player


Works just fine when I typecast, but I decided to post anyways to see if this is indeed intended behaviour.
usr is always defined as /mob regardless of what world.mob is set to. You'll have to type-cast, or define LoadChar() under /mob insted of /mob/player.

As a rule of thumb if you run into code problems you should always try to deal with the problem on the developer forums first to be sure programmer error can be ruled out.