Troubleshooting Modules

From ASSS Wiki
Revision as of 04:41, 30 December 2010 by Cheese (talk | contribs) (added knowledge)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Here are some general solutions to help you solve a problem with a module that you just wrote. Keep in mind that these are suggestions, and may not always be correct.


My module works when I put it in modules.conf, but the zone crashes when I use ?insmod, why?

Chances are, you are doing something in the CB_ARENAACTION callback, and are doing something in the AA_PRECREATE or AA_CREATE states. Simply do this when the module loads:

Arena *a;
Link *link;
aman->Lock();
FOR_EACH_ARENA(a)
{
	ArenaAction(a,AA_PRECREATE);
	ArenaAction(a,AA_CREATE);
}
aman->Unlock();


When my module is in modules.conf, players can not enter the zone, or when I use ?insmod, players can not switch arenas and I get errors about player states!

You may be using arena data improperly. Be sure you have gotten the I_ARENAMAN interface and have used AllocateArenaData() properly.


My module keeps failing to load!

Be sure you have all the necessary modules needed for your module to run. Make sure your module loads after the modules it is dependant on are already loaded.


My module crashes whenever I try to use an interface!

Make sure you have gotten the interface by using GetInterface(). You may have forgotten to check if your interface is valid. (like if(!iface) return MM_FAIL;)


My module will not compile! Why can't my compiler find certain things?

Sometimes, #include asss.h is not enough. Only the core header files are in asss.h, and you will need to manually include any others. This may also be true if you are using a custom interface.