Register for your free account! | Forgot your password?

You last visited: Today at 23:12

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[HELP] Error

Discussion on [HELP] Error within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 20
Join Date: May 2008
Posts: 1,103
Received Thanks: 254
[HELP] Error

Ok yes im useing LOTF but this error is starting to get old now iv tried to fix it but wont work? maybe soemone else can tell me how to here is the error
at COServer_Project.World.SurroundDroppedItems(Charac ter Me, Boolean Check) in C:\Dex~Co\COServerProjectv1\COServerProject\World. cs:line 388
at COServer_Project.Client.GetPacket(Byte[] data) in C:\Dex~Co\COServerProjectv1\COServerProject\Client .cs:line 9852
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.Collections.Hashtable.HashtableEnumerator.M oveNext()

Here is the code
HTML Code:
        public static void SurroundDroppedItems(Character Me, bool Check)
        {
            foreach (DictionaryEntry DE in DroppedItems.AllDroppedItems)
            {
                DroppedItem item = (DroppedItem)DE.Value;

                if (item.Map == Me.LocMap)
                    if (MyMath.CanSee(Me.LocX, Me.LocY, item.X, item.Y))
                        if (!MyMath.CanSee(Me.PrevX, Me.PrevY, item.X, item.Y) || Check == false)
                        {
                            Me.MyClient.SendPacket(General.MyPackets.ItemDrop(item.UID, item.ItemId, item.X, item.Y));
                        }
            }
        }
Pete1990 is offline  
Old 05/28/2009, 02:03   #2
 
Zeroxelli's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 1,769
Received Thanks: 1,143
Looks like you're trying to directly modify the enumeration, you'd have to modify the data in a different way for it to work.

Also, use something like IList<> or List<>
Zeroxelli is offline  
Old 05/28/2009, 02:04   #3
 
elite*gold: 20
Join Date: May 2008
Posts: 1,103
Received Thanks: 254
Well i was thinking just thinking if this is missing it could mess it up right?
try
{

}
catch (Exception Exc) { General.WriteLine(Exc.ToString()); }
}
Pete1990 is offline  
Old 05/28/2009, 02:07   #4
 
damianpesta's Avatar
 
elite*gold: 0
Join Date: Jan 2007
Posts: 1,034
Received Thanks: 58
Quote:
Originally Posted by Pete1990 View Post
Well i was thinking just thinking if this is missing it could mess it up right?
try
{

}
catch (Exception Exc) { General.WriteLine(Exc.ToString()); }
}
too many exceptions gonna do really bad.So try not to use them as much.
damianpesta is offline  
Old 05/28/2009, 04:37   #5
 
elite*gold: 0
Join Date: Jan 2009
Posts: 1,922
Received Thanks: 491
what did you try to do when the error came up?

Code:
        public static void SurroundDroppedItems(Character Me, bool Check)
        {
            foreach (DictionaryEntry DE in DroppedItems.AllDroppedItems)
            {
                DroppedItem item = (DroppedItem)DE.Value;

                if (item.Map == Me.LocMap)
                    if (MyMath.CanSee(Me.LocX, Me.LocY, item.X, item.Y))
                        if (!MyMath.CanSee(Me.PrevX, Me.PrevY, item.X, item.Y) || Check == false)
                        {
                            Me.MyClient.SendPacket(General.MyPackets.ItemDrop(item.UID, item.ItemId, item.X, item.Y));
                        }
            }
        }
thats mine.
PeTe Ninja is offline  
Old 05/28/2009, 04:38   #6
 
elite*gold: 20
Join Date: May 2008
Posts: 1,103
Received Thanks: 254
Same Thing as mine
Pete1990 is offline  
Reply


Similar Threads Similar Threads
PortMap Error: RichEdit line insertion error
02/16/2012 - Metin2 Private Server - 5 Replies
Hey Leute, habe mir letztens nen Metin2 P-Server mit Hamachi erstellt. Alles läuft super, wenn da dieser kack nicht wäre. PortMap zeigt eine Fehlermeldung, nachdem man sich eingeloggt hat: RichEdit line insertion error. Diese erscheint einmal zusätzlich pro Sekunde und PortMap und Metin2 wird beendet, sobald ca. 100 von diesen Meldungen auf dem Bildschirm sind. Was soll ich machen? Hat jemand ne Lösung? Vielen Dank im Vorraus =)
[Fehler] Patch? Error? Hier Hilfe! [Error]
12/02/2010 - Combat Arms - 14 Replies
Da ich keine Werbung machen möchte muss ich wohl alles abkopieren... Ich entschuldige mich das ich alles zuspoilern musste aber bei soviel Text....;) 1.Error Codes und ähnliches Da es nach einem neuen Update immer wieder Probleme auftreten, empfehlen wir Euch folgende Liste mit den häufigsten Fehlern durchzugehen: 1. Deinstalliere Combat Arms über Arbeitsplatz-->Software 2. Prüfe ob alle Ordner von Nexon auf der Festplatte gelöscht sind. Wenn nicht lösche...
MySro Error~>Microsoft Error Visual C++ Runtime...
08/18/2009 - SRO Private Server - 3 Replies
Hello, i have got a problem: http://image.cp-g.net/pics/4a8971bd15c0d.jpg. I have already installed Microsoft Visual C++ Runtime Library 2005 and after that i installed 2007. It didn´t work. Who can help me? thanks Alucard15



All times are GMT +1. The time now is 23:13.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.