1
2
Dec 22 2015, 2:02 pm
|
|
Wow what an amazing post that needs to be part of a guide for people starting DM. Thank you so much for that information I think I understand it far better now.
|
In response to Ter13
|
|
Ter13 wrote:
When I call the save proc manually using a verb I get a bad output the first time. Unfortunately I've never been able to reproduce the issue. It never happens for me. Originally I thought it only happened on Windows 7, but I've tested on 7 since then and it doesn't have a problem any time I test it. For the OP, if you want to save a location and load it again, my recommendation is to override Write() and Read(): mob/Write(savefile/F) |
In response to Ter13
|
|
Oh, also this warning: With savefiles, remember DM will always save everything related to what you're working with. So avoid saving a turf directly; other people's mobs may be standing on it and get dragged into your savefile. Avoid having a reference to another mob, even indirectly, that isn't stored in a /tmp var. If your mob has a turf var (like var/turf/home), make it /tmp and also be sure to use the x,y,z trick so you don't save the actual turf. If your mob has a list of friends or targets, that needs to be /tmp. Objs that keep track of their owners: Keep track by key and/or name instead.
Authors who don't take this into account often run into situations where other people's mobs start getting saved in someone else's savefile, causing a "rollback" as soon as they log in--because they end up connecting to the older mob. |
In response to Ter13
|
|
Ter13 wrote:
Hebrons, where are you getting this code example? been working on saving , is this better ? mob/proc/Save_File(savefile/File) |
In response to Lummox JR
|
|
Lummox JR wrote:
Don't call Read() and Write() directly. |
In response to Hebrons
|
|
Hebrons wrote:
alright cool thanks :) The advice he gave was one problem out of dozens that are still present in your code. -.- name isnt even a temporary variable |
1
2