ID:71858
 
Not a bug
Not a bug
BYOND Version:441
Operating System:Windows XP Home
Web Browser:Firefox 3.0.10
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:
client/Command() will not execute at all if no mob is connected to the client.

Code Snippet (if applicable) to Reproduce Problem:
client
New()
// mob = new --- giving us a mob allows us to talk to the client
while(1) sleep(10) // block it somehow so we don't die right away.

Command(cmd)
world << "[src]: [cmd]"


Expected Results:
I'm not even sure if this is a bug. It just seems to me that the client operations should work as long as the client is connected, but I understand if this is intended.

I expect it to execute the function as expected.

Actual Results:
It doesn't.

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

When does the problem NOT occur?
If a mob is connected.

Workarounds:
Connect a mob, I guess.

[edit]
This is apparently intended according to the reference.
Kind of weird, but ok...
[/edit]
I'm not quite sure this is a bug, as you're blocking New() from returning. Is there a more practical scenario you could give that causes this problem to occur?
This bug's been verified on Windows XP Pro with BYOND 440.1018 as well, now that I'm done mis-understanding him. The snippet in the original code does nothing, but if you throw in a mob = new/mob before his while() loop, client/Command is processed perfectly.
Since all kinds of unexpected stuff can happen if you don't let client/New() call ..() early on, this is not a surprise. However inasmuch as Command() is a verb, it should not be executed without a valid usr mob anyway. As noted in the previous edit, the fact that no command is executed when no mob exists to execute it is intended behavior.