Page 1 of 1

mobs, merchants and the db...

PostPosted: Sun Jan 23, 2005 2:14 am
by rej
Hi there,

After creating mobs and merchants to my own daoc-world, and restarting the server for scripting purposes, i always get these errors:
1/23/2005 02:53:39 438 ERR System.IndexOutOfRangeException: Der Index war außerhalb des Arraybereichs.
at DOL.GS.Scripts.ScriptMgr.FindNPCGuildScriptClass(String guild, eRealm realm) in d:\Kopie von DOLSharp\GameServer\gameutils\ScriptMgr.cs:line 730
at DOL.GS.Region.LoadFromDatabase(Int64& mobCount, Int64& itemCount) in d:\Kopie von DOLSharp\GameServer\world\Region.cs:line 384
at DOL.GS.WorldMgr.Init() in d:\Kopie von DOLSharp\GameServer\world\WorldMgr.cs:line 278
1/23/2005 02:53:39 438 WRN World Manager Initialization failed
1/23/2005 02:53:39 438 ERR Failed to notify event handler, timeout on lock operation!
1/23/2005 02:53:39 448 ERR System.Reflection.TargetInvocationException: Ein Aufrufziel hat einen Ausnahmefehler verursacht. ---> System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
at DOL.GS.GameEvents.TeleporterEvent.OnScriptUnload(DOLEvent e, Object sender, EventArgs args)
--- Ende der internen Ausnahmestapelüberwachung ---
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess)
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean verifyAccess)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodInfo.Invoke(Object obj, Object[] parameters)
at DOL.WeakMulticastDelegate.Invoke(Object[] args) in d:\Kopie von DOLSharp\DOLBase\WeakMulticastDelegate.cs:line 145
at DOL.Events.DOLEventHandlerCollection.Notify(DOLEvent e, Object sender, EventArgs eArgs) in d:\Kopie von DOLSharp\GameServer\events\DOLEventHandlerCollection.cs:line 230
1/23/2005 02:53:39 448 INF Deregistered GameClient events for GUI! succeeded
1/23/2005 02:53:39 458 INF stopping server step 1
1/23/2005 02:53:39 458 WRN System.Exception: Server is no longer accepting connections
1/23/2005 02:53:39 458 INF stopping server step 2
1/23/2005 02:53:39 458 INF stopping server step 3
1/23/2005 02:53:39 458 INF stopping server step 4
1/23/2005 02:53:39 458 INF Saving database...

I am running MySQL-4.1.19 and current cvs build of DOL.
It's the 3rd time i now replicate my database for running dol on it at this weekend. any helps on this ?

PostPosted: Sun Jan 23, 2005 9:52 am
by duff
the first bug come from FindNPCGuildScriptClass
so an custom npc have not the attribut NPCguild or something like that and it make bug the server.
Have you the base script or have you add some script to your folder?
have you the database with mob randomwalk?
if yes have you the script mobrandomwalk?
the other bug come from orldmgr not succeed to load so make bug other things I think.

PostPosted: Sun Jan 23, 2005 10:55 am
by rej
I'm running many types of script, ie.
ItemGenerator, etc.

i just found out, i get this error when adding mobs by using
/mob create DOL.GS. ...

i just did /mob create DOL.GS.Scripts.GameHealer (this is the one in cvs), and i got the same error here.

I am not using Mobrandomwalk


/edit: i just inserted MailNPC, NameRegistrar and ItemGenerator and let the server run until i edit or add something to my server (server runs smooth, so why restarting?).
I'm telling you what happened when restarting the server then.

PS: edited
Code: Select all
protected static Hashtable[] m_gs_guilds = new Hashtable[5];
protected static Hashtable[] m_script_guilds = new Hashtable[5];
and renamed [5] to [6] after advice from TheSchlaf, i hope this one will work now.
so an custom npc have not the attribut NPCguild or something like that and it make bug the server.
what do you mean with that and how can i add this attribute to my NPCs?

PostPosted: Sun Jan 23, 2005 12:54 pm
by Holly
I was reading somewhere that MySQL 4.1.xxx doesn't like .NET too much.. Try downgrading to 4.0.xxxx

PostPosted: Sun Jan 23, 2005 12:59 pm
by nor
What realm do you set for mobs that you /mob created ? Realm 4 is last supported by FindNPCGuildScriptClass.

PostPosted: Sun Jan 23, 2005 1:20 pm
by rej
Then i know where the error is.
I made /mob realm 6.
Im currently rewriting all mobs to 4, i hope my change above do not crash everything up now:)

what is realm 4 for ?
i know 0 and those other 3 for player specific realms, never heared of 4

PostPosted: Sun Jan 23, 2005 4:57 pm
by nor
No idea... But this array is limited to 5 realms (0 .. 4)
protected static Hashtable[] m_script_guilds = new Hashtable[5];

PostPosted: Sun Jan 23, 2005 6:32 pm
by Gandulf
Then i know where the error is.
I made /mob realm 6.
Im currently rewriting all mobs to 4, i hope my change above do not crash everything up now:)

what is realm 4 for ?
i know 0 and those other 3 for player specific realms, never heared of 4


Realm 4 is officially not used, but unofficially it's used in etaew's Guards Scripts for PvP Guards, same goes for realm 5 which is inofficially used for event mobs. To reduce chances of collision, I decided to use the next free number '6' for peace realm.