ID:160766
 
I was just wondering if there was a way to close the game manually, without the player having to click the 'X' in the top-right at some point. After browsing the reference, I found you could use winshow() to call the .quit proc like so:
winshow(src,null,".quit")

But, while closing the window, this leaves the game open in BYOND. So when I change the code and re-compile, it says it's locked up. Is this a bug, or simply not the right way to do it?
Adam753 wrote:
But, while closing the window, this leaves the game open in BYOND.

Hmm... can you elaborate more? Does sound like a bug.
In response to Kaioken
When you have a game open, right-click in the BYOND symbol in the right side of the taskbar. You have a "worlds" list there. When I quit the world using the winshow() proc, it stays in that list.
I'm not sure if this happens when .quit is called "properly" from a macro, I'll go find out.

Nope, it only happens when .quit is called using winshow().
In response to Adam753
Adam753 wrote:
When you have a game open, right-click in the BYOND symbol in the right side of the taskbar. You have a "worlds" list there. When I quit the world using the winshow() proc, it stays in that list.

Ah, I see. Wasn't aware of that list, but presumably the dreamseeker.exe process also remains running, so it's not an issue with the list updating per say (you said your RSC file is still in use).

Nope, it only happens when .quit is called using winshow().

And with that post, Report Time! I'll reply in your topic as to whether I also get it or not later.

EDIT: ... Wait, wasn't winset() used for this, not winshow()? I assumed I didn't remember correctly and it was as you said, but anyway if it does cause what you said it should be reported at any case (I guess you probably mixed it up when posting). Hm, the game is really being 'closed', right?
In response to Kaioken
Kaioken wrote:
EDIT: ... Wait, wasn't winset() used for this, not winshow()? I assumed I didn't remember correctly and it was as you said, but anyway if it does cause what you said it should be reported at any case (I guess you probably mixed it up when posting).

Nope. nothing at all happens when I use winset() instead of winshow(). Besides, I got it off the DM reference, so it wasn't going to be wrong!

Hm, the game is really being 'closed', right?

Yes, it disappears from the taskbar and I can't get to it using alt+tab. It's just that the RSC file continues to be used when the game is closed this way.
In response to Adam753
Adam753 wrote:
Nope. nothing at all happens when I use winset() instead of winshow(). Besides, I got it off the DM reference, so it wasn't going to be wrong!

Hmm, but the Reference says this:

Another use for winset() is to send commands to the client that normally can only run from there, like .profile or .quit. To do this leave the window argument null, and just use a parameter called "command":
[...]
winset(usr, null, "command=.quit")
In response to Adam753
Adam753 wrote:
Kaioken wrote:
EDIT: ... Wait, wasn't winset() used for this, not winshow()? I assumed I didn't remember correctly and it was as you said, but anyway if it does cause what you said it should be reported at any case (I guess you probably mixed it up when posting).

Nope. nothing at all happens when I use winset() instead of winshow(). Besides, I got it off the DM reference, so it wasn't going to be wrong!

winset(usr, null, "command=.quit")

Hm, the game is really being 'closed', right?

Yes, it disappears from the taskbar and I can't get to it using alt+tab. It's just that the RSC file continues to be used when the game is closed this way.

As for the problem with winshow(). The last parameter is suppose to be a 0 or 1 and nothing else. Where you got the idea of putting a text string in there I would like to know.
In response to Green Lime
Oh. I'm not entirely sure, I must have read something wrong. And I didn't know the "command=" part. Thanks anyway =P

Edit: Oh wait, I just realised you aren't Kaio. Now that's weird!
In response to Kaioken
Well then, to be honest, i read it a few days ago. Only yesterday, I realised I'd need it, and whatever I remembered what a mixture of two things. That's my theory :P