|
1. SWFote - Issue(s)
|
|
Tue Apr 6, 2010 [10:32 AM]
|
Magister
Email not supplied
member since: Feb 9, 2010
|
Reply
|
|
Here's an issue I've had rants about in my head for the past 2 months almost.
Say I create a mprog on an item or a mob, or a room. Whenever I save a zone, hotboot, load the zone and said room/obj/mob, the program for some reason isn't "loaded", thus forcing me to edit the program, re-save it, and then attempt to activate the program once more. What's causing this and how do I fix it? I'm asking here, mainly because I assume anyone else who used a stock swfote codebase would've had the same issue.
I wanted to get this fixed a while back, but seeing as to how my mud is still in dev anyway, it wasn't a high priority, but now it's just really annoying me so I figured I'd fix it.
|
|
|
|
|
2. RE: SWFote - Issue(s)
|
|
Tue Apr 6, 2010 [12:26 PM]
|
koder
Email not supplied
member since: Oct 4, 2009
|
In Reply To
Reply
|
|
I'm not familiar with your codebase but can provide you generic steps for debugging your problem.
1. Consider saving a specific type of "prog" 2. Examine the save function. Follow the code and look for the section that would handle the type of "prog" from 1. 3. Most likely, there is some condition not being met which causes the "prog" to be written to storage. Determine why this condition isn't being met. Run in a debugger and put a breakpoint around here, or just add logging and determine code path that way. 4. If the condition is being met, perhaps you have a problem with permissions writing to your store where the mud thinks that it has written but only is denied write privileges. 5. Perhaps there is no problem with recording the "prog" to storage, but there is a problem with loading the "prog" from storage so that it never actually reads it in and re-initializes the "prog". Upon the next hotboot, the mud writes to storage and assumes that there is no "prog" to save anymore. When the mud loads, there is no evidence of a "prog" in storage.
Hope this helps. Code is deterministic and predictable, you can always figure out what's going on if you know the code path you are executing along. Consider the scenarios and it should be easy to figure out what is going wrong. Worst case, you will know what happened. Best case is that you will know what happened and know how to fix it.
|
|
|
Immortal Wars
raiden.servegame.org:9009
|
|
3. RE: SWFote - Issue(s)
|
|
Tue Apr 6, 2010 [3:15 PM]
|
Macademus
Email not supplied
member since: Apr 29, 2000
|
In Reply To
Reply
|
|
is the mprog actually saving to the area file (or wherever it saves), if so, you probably have some kind of issue with your area loading function.
Or whatever loads the mprogs..
|
|
-Tijer
http://www.godwars.net - A Wealth of GodWars Information
Legends of Hatred: godwars.net:3500 - Heavily modified GodWars
|
|
4. RE: SWFote - Issue(s)
|
|
Wed Apr 7, 2010 [7:11 AM]
|
Magister
Email not supplied
member since: Feb 9, 2010
|
In Reply To
Reply
|
|
Yeah it's definitely saving to the area file. The problem is, I'm still a new coder and I don't know near enough to determine where in the hotboot to add checks for loading mprogs and oprogs, my latest attempt rewarded nothing to my cause.
I'm using SWFote Fuss, some of which has been modified by me for my own purposes but none of those changes should've messed with saving or loading progs in hotboot-- which makes me assume that the codebase never loaded them in the first place at all. I was getting curious if there was a code snipper that was already done by someone else to get this working correctly, but I'm having some doubts now. (Also makes me wonder how people get by without having it...)
|
|
|
|
|
5. RE: SWFote - Issue(s)
|
|
Mon Apr 19, 2010 [8:49 AM]
|
Magister
Email not supplied
member since: Feb 9, 2010
|
In Reply To
Reply
|
Okay, I'm posting this link as a method to help anyone else who also has the same issue. Apparently it's a problem that lies within the db.c file of the code. http://www.smaugmuds.org/index.php?a=topic&t=4390&p=20553#p20553 Many thanks to Remcon for the fix on this one! Note that this is a problem with both SWR and SWFote. I tested it out and it fixed all my problems.
|
|
|
|
|