Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Nostale
You last visited: Today at 15:11

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

Advertisement



Can someone help with it?

Discussion on Can someone help with it? within the Nostale forum part of the MMORPGs category.

Reply
 
Old   #1
 
InnoTx's Avatar
 
elite*gold: 100
Join Date: Dec 2016
Posts: 342
Received Thanks: 82
Unhappy Can someone help with it?

Hi.

i Really dont want to Annoying someone just write something if u want to be Helpfull


now i Worked on the new Leaked or Released Cryless Source and got some Problems With Parser and ON.Import.Console


now the first Problem is i get this Error:

That the CPU issue is at 100% and it does nothing like it dont Parse just CPU issue is at 100%


or

it shows me something with that code
HTML Code:
     Parallel.ForEach(_packetList.Where(o => o[0].Equals("at")), linesave =>
            {
                if (linesave.Length <= 7 || dictionaryMusic.ContainsKey(int.Parse(linesave[2])))
                {
                    return;
                }
                dictionaryMusic[int.Parse(linesave[2])] = int.Parse(linesave[7]);
                if (_packetList.FirstOrDefault(s => s[0].Equals("c_map") && _packetList.FindIndex(b => b == s) > _packetList.FindIndex(b => b == linesave)) is string[] cmap)
                {
                    dictionaryMap[short.Parse(cmap[2])] = short.Parse(linesave[2]);
                }
            });
and if u want to ask did u have add in ON.Master.Server this one:
HTML Code:
    <add key="PartnerSpXp" value="1"/>
yes i did it.

i've did this one too :
HTML Code:
                    string[] linesave = line.Split(' ');
                    if (linesave.Length <= 2)
                    {
                        continue;
                    }
idk what i have to do... so if someone knows and want to Help me Feel free to add me on Discord : Inno#5157





EDIT !!!: so now i've got helped by the Code from @ Ty so much btw.

and now the Problem is that ive got this one :

if i Click on "Y" it starts up to 100% and my pc freeze

btw. no my pc is good and would be much then enough for it so idk could someone help me ?

Ty in advance
Sorry for my Bad english


Greetings
Inno
InnoTx is offline  
Old 08/28/2019, 20:10   #2

 
Blowa's Avatar
 
elite*gold: 48
Join Date: Jan 2010
Posts: 647
Received Thanks: 1,789
Typical "optimization" that is just bullshit.
Using parallel for that is useless and may produce a deadlock/unexpected behavior.

You are trying to write on a dictionary without even checking if the dictionary already contains the key.
If your packet.txt got 2 entries where someone went on the same map, it might happen that your dictionary is getting modified (adding a new key)

Don't know if that dictionary is a "ConcurrentDictionary" on the source you are using, but if it's not, it may be a probably reason of your crashes.

As well, I would recommend to switch back to a simple foreach without any kind of concurrency.
Parallel foreach is sometimes faster than a foreach, depending on how you manage to use the data you are iterating on.

Anyway, usage of Parallel here is unjustified and probably slowing down your parsing for no reason.
But this kind of code does have CPU costs since it's using computation on CPU (parsing, linq filtering...)
Blowa is offline  
Thanks
1 User
Old 08/28/2019, 21:24   #3
 
InnoTx's Avatar
 
elite*gold: 100
Join Date: Dec 2016
Posts: 342
Received Thanks: 82
so what u mean what i have to do now i mean i dident write the code and ive got some Crashes with Where is the Parallel.cs ... idk what u mean sorry but ty for trying help me
InnoTx is offline  
Old 08/28/2019, 22:41   #4
 
NosRaible's Avatar
 
elite*gold: 0
Join Date: Jun 2018
Posts: 121
Received Thanks: 42
Quote:
Originally Posted by InnoTx View Post
Hi.

i Really dont want to Annoying someone just write something if u want to be Helpfull


now i Worked on the new Leaked or Released Cryless Source and got some Problems With Parser and ON.Import.Console


now the first Problem is i get this Error:

That the CPU issue is at 100% and it does nothing like it dont Parse just CPU issue is at 100%


or

it shows me something with that code
HTML Code:
     Parallel.ForEach(_packetList.Where(o => o[0].Equals("at")), linesave =>
            {
                if (linesave.Length <= 7 || dictionaryMusic.ContainsKey(int.Parse(linesave[2])))
                {
                    return;
                }
                dictionaryMusic[int.Parse(linesave[2])] = int.Parse(linesave[7]);
                if (_packetList.FirstOrDefault(s => s[0].Equals("c_map") && _packetList.FindIndex(b => b == s) > _packetList.FindIndex(b => b == linesave)) is string[] cmap)
                {
                    dictionaryMap[short.Parse(cmap[2])] = short.Parse(linesave[2]);
                }
            });
and if u want to ask did u have add in ON.Master.Server this one:
HTML Code:
    <add key="PartnerSpXp" value="1"/>
yes i did it.

i've did this one too :
HTML Code:
                    string[] linesave = line.Split(' ');
                    if (linesave.Length <= 2)
                    {
                        continue;
                    }
idk what i have to do... so if someone knows and want to Help me Feel free to add me on Discord : Inno#5157


Ty in advance
Sorry for my Bad english


Greetings
Inno
I have fix of it. Maybe i can give you some advises

Layne#6797
NosRaible is offline  
Old 08/29/2019, 06:11   #5
 
erixor's Avatar
 
elite*gold: 0
Join Date: Jul 2013
Posts: 409
Received Thanks: 1,067
Quote:
Originally Posted by InnoTx View Post
so what u mean what i have to do now i mean i dident write the code and ive got some Crashes with Where is the Parallel.cs ... idk what u mean sorry but ty for trying help me
"where is the parallel.cs" u_u

In the code example you sent in your thread, there is a :
Parallel.ForEach(_packetList.Where(o => o[0].Equals("at")), linesave => blablabla...

Replace that Parallel by a simple foreach such as :

Code:
foreach (var linesave in _packetList.Where(o => o[0].Equals("at")))
{
     blablabla...
}
Because as Blowa said, Parallel foreach involves not needed concurrency. That's what happens when people don't know what they're doing.

Btw, this is only a "probable fix", because we can't really help more with a simple "it shows me something with that code "
erixor is offline  
Thanks
1 User
Old 09/01/2019, 16:44   #6
 
InnoTx's Avatar
 
elite*gold: 100
Join Date: Dec 2016
Posts: 342
Received Thanks: 82
EDIT !!!: so now i've got helped by the Code from @ Ty so much btw.

and now the Problem is that ive got this one :

if i Click on "Y" it starts up to 100% and my pc freeze

btw. no my pc is good and would be much then enough for it so idk could someone help me ?
InnoTx is offline  
Old 09/04/2019, 12:53   #7
 
InnoTx's Avatar
 
elite*gold: 100
Join Date: Dec 2016
Posts: 342
Received Thanks: 82
push still need help with it
InnoTx is offline  
Old 09/04/2019, 18:39   #8

 
FI0w's Avatar
 
elite*gold: 50
Join Date: Jul 2014
Posts: 1,699
Received Thanks: 1,165
Quote:
Originally Posted by InnoTx View Post
push still need help with it
This "professional" code is so. It's use like 100% cpu for loading maps make sure everything is like it should be. Even then it will take like 5-20min depend on your Pc.
FI0w is offline  
Old 09/04/2019, 22:02   #9
 
0Lucifer0's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 1,005
Received Thanks: 1,019
Opennos parser is having a lot of n+1 you will need to remove them but this is not easy task without knowledge in c# and Db.
0Lucifer0 is offline  
Reply

Tags
nostale, opennos, parser, source


Similar Threads Similar Threads
Can someone help me? How can i add 12d drops to Jupiter Mobs
12/17/2011 - SRO Private Server - 1 Replies
Please someone help me :(
PLEASE......CAN SOMEONE CAN GIVE ME AN ENGINE THAT CAN'T BE DETECTED...
12/30/2009 - Grand Chase Hacks, Bots, Cheats & Exploits - 3 Replies
...GIVE ME AN ENGINE THAT IS N0T DETECTED..... KAHIT NA PANG 5 DAYS LANG !^^...IF YOU ARE FINISH TO READ YOU CAN CLOSED THIS THREAD....>.<:):):):):)
Someone know how to use bot on Russian server or can someone do a bypass for russion?
08/28/2009 - General Gaming Discussion - 7 Replies
plz i see here allot of bypassed for english verison only but nothing from cheats or hacks for russian server :/



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


Powered by vBulletin®
Copyright ©2000 - 2025, 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 ©2025 elitepvpers All Rights Reserved.