ID:779006
 
Not a bug
BYOND Version:494
Operating System:Windows 7 Pro 64-bit
Web Browser:Chrome 19.0.1084.52
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.
Try this code out. Doesn't do anything.

world
mob = 0
client
New()
..()
alert(src, "hello")


Not sure if this is intended by design. Kind of doesn't make any sense, if so. Why are we required to have a default mob for the client in order to show interfaces and alerts and such?
It's very intended. Clients need a mob and world.mob is the default type made.

Don't modify client/New for things like alerts. The DM reference specifically tells you not to. You're better off using mob/Login instead.
In response to Kaiochao
Kaiochao wrote:
It's very intended. Clients need a mob and world.mob is the default type made.

Don't modify client/New for things like alerts. The DM reference specifically tells you not to. You're better off using mob/Login instead.

Obviously I just did this for example. I found it weird that not even the interface will show up if mob is set to 0.
In response to FIREking
I just looked at the reference entry for world.mob, and it is documented that 0 is a valid value for world.mob, which makes no sense to me. I've never known of any clients without a mob set, if that's what it implies.

I have a feeling client/New isn't working because it relies on world.mob, if none of the previous searches are successful (see reference). I could be wrong, since I no longer fully understand what I'm dealing with here :/
It can be set to 0 if you want to designate and create a mob, or load a mob in client/New(), which I believe is in the reference as well.
In response to Super Saiyan X
But if there's no override in client/New and no prototype mob with a key set, using world.mob=0 won't work?
Well, it says "The default value is /mob. Setting world.mob to 0 prevents the creation of default mobs. "
the entire point is to avoid creating a default mob. If there is no default mob, of course it's not going to connect to anything.
I don't know why it exists...but it's intended, and, along with it, you're supposed to override client/New().
Code-wise you need to designate the mob yourself. Something like this:
world
mob = 0
client
New()
..()
if (!mob)
mob = new/mob // You must create the mob yourself
return mob // You must return the mob yourself

You can't forget that you have to return something in client/New() to allow the connection.
Ah ok! Sorry for the bug report!
Tom resolved issue (Not a bug)