ID:85796
 
Not a bug
BYOND Version:458.1050
Operating System:Windows 7 Ultimate 64-bit
Web Browser:Internet Explorer 8.0
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:Not sure if its a bug or not, but if not, it could use some improvement.

Numbered Steps to Reproduce Problem:
1.Host a game using DreamDaemon.
2.Press the stop button.

Now, if you have something set to save on world Del() it wont do it with the stop button, only if you use reboot or something. Also, the same is true if you right click the icon, and click exit while a server is running.

However, if you go to world>>reboot, it will save as expected, but I feel it could be improved so if you right click the tray icon, or click the stop button it will save just like a reboot would, that it would allow world Del() code to run and save whatever it needs to.

As it is now, I am forced to reboot the server to make it save before pressing the stop button or exiting my game.

Code Snippet (if applicable) to Reproduce Problem:


Expected Results:It will save everything as expected and do the same stuff world<<reboot would with the exception of server caming back up.

Actual Results:Nothing saves as I would expect it to, I have to reboot first.

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

When does the problem NOT occur?When rebooting server it saves, then u can do stop/exit.

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 don't know, I can assume so, I don't know if peoples logouts codes get called either to save, so if the mob Logout() code doesn't call when u press the stop button or exit button, it needs to, because rebooting seems to work fine.

Workarounds:Reboot the server before you exit the program or press the stop button.

</<reboot>
A simple test does not confirm this problem:

world/New()
..()
log << "World started"
world/Del()
log << "World ended"
..()

Hitting stop in Dream Daemon produces the expected result of saying "World ended" in the output window.
I have source if u show me where to send it to, some e-mail or something, if it source at fault, the code change to fix it, otherwise a look into what might need improved to fix it....

Specifically, house saving is on Del() and if I try and save items upon that, pressing Stop makes the items not save.
You can send me source at [email protected].
Your code has two problems. In world/New() and world/Del(), you are not calling ..() (it should be called at the end of world/Del()), and you have included "set background=1" in both procs which is going to force them to a lower priority. One or both of these issues is preventing the save from taking place.