Ok so i finally figured out what exactly was wrong with my save proc and what was happening and figure I would post the results so anybody else with similar problems might get the answer.
Problem description:
Sometimes the loc would get messed up and wouldnt load, or it would load someone elses mob along with yours. As if the players are linked.
Solution:
So after waiting until there was the problem with a file I went through and took out every load var one by one to figure out which var was calling the rollback and figured out what was causing it.
When i was defining my Spawn var i was using the mobs current loc as the reference. If there is a mob on the location when you save it you save the mob as well. So you dont want to save the location of the spawn with a variable. Unless somebody knows a way to save a loc to a var so you can use "usr.loc=usr.Spawn" but as of now i cant so i dont save my Spawn var and just redefine it in my load proc.
ID:142303
Jun 27 2008, 11:04 am (Edited on Jul 15 2008, 1:55 pm)
|
|
In response to Jeff8500
|
|
actually i went away from doing that cause i dont want to save all variables and when i did i got more problems so i went to saving the specific variables that i want to save
|
In response to NightJumper88
|
|
Set the vars you don't want to save as tmp vars.
|
In response to Jeff8500
|
|
i have them set as tmp but i was still getting stuff coming back i just dont trust the built in save stuff
|
In response to NightJumper88
|
|
Stuff was "coming back" because you kept the same save files most likely. There's no reason not to trust DM's built in functions.
|
In response to Jeff8500
|
|
whats wrong with keeping the save files they should still work shouldnt they
|
In response to NightJumper88
|
|
and this is getting away from my question anyways i need to figure out why sometimes the loc is messed up
|
In response to NightJumper88
|
|
It's fine, yes, but as I said, stuff kept "coming back" because you never overwrote/removed those parts of the files.
|
In response to Jeff8500
|
|
ok so how would i do that
|
In response to NightJumper88
|
|
Delete the save folder, and then open your world...
|
In response to Naokohiro
|
|
Ok i need to figure out whats going on with this it sometimes links players together but there are no variables that are saved that link players and it happens quite often now.
|
In response to NightJumper88
|
|
What exactly do you mean by, "links players together?"
|
In response to Naokohiro
|
|
when one player loads it effects another player and sometimes reverts back to old state. But lately its been saying its logged out
|
In response to NightJumper88
|
|
It happens the same with me... Whenever someone logs in, a random player logs out, and sometimes they lose their Character:
http://www.byond.com/developer/forum/?id=628408 |
NightJumper88 wrote:
Ok so ive had this problem for awhile now but it doesnt always do it. Sometimes the save or load doesnt work for the location and it will load all the stats but not the mob location and then go to the logout proc. > Load() > mob/proc Problem description: |
In response to Cybork
|
|
Did you ever find a way to solve it
|
In response to NightJumper88
|
|
Lately I added a turf/obj save system and it looks to be working...
|
In response to NightJumper88
|
|
Try to override the Read and Write procs.
mob |
F["mob"] << src
That would cut your code down...alot.