Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > .NET Languages
You last visited: Today at 16:42

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

Advertisement



Search string in File and return value C#

Discussion on Search string in File and return value C# within the .NET Languages forum part of the Coders Den category.

Reply
 
Old   #1



 
IceTrailer's Avatar
 
elite*gold: 150
Join Date: Sep 2010
Posts: 2,070
Received Thanks: 821
[SOLVED] Search string in File and return value C#

Hello guys.


I want to code following to for the MMORPG Nostale (or rather the String files of it).

There is a monster.txt (where the monster strings are)
and there is a monster.dat (where the stats from the monsters are, including string name and VNUM (!))

There are examples for the files I told you.

monster.txt


monster.dat


My plan is to check line by line if the first string of monster.txt is contained in the monster.dat each 25 lines. And if so, I want to return the value to the console output

So my problem is that I already know how to read the first 25 lines to one string (using StringBuilder) and get the value after "VNUM" (this is what I want get returned). But I don't know how to to that with the rest of the files.

My code


I hope you understand and you can help me a bit.

PS: I also speak German! :P
IceTrailer is offline  
Old 10/25/2014, 01:48   #2

 
snow's Avatar
 
elite*gold: 724
Join Date: Mar 2011
Posts: 10,479
Received Thanks: 3,318
Arrow <span itemprop="articleSection">General Coding</span> -> .NET Languages

#moved
snow is offline  
Thanks
1 User
Old 10/26/2014, 01:28   #3



 
IceTrailer's Avatar
 
elite*gold: 150
Join Date: Sep 2010
Posts: 2,070
Received Thanks: 821
Solved.

I used lists (dictionary) where I put all the strings and so on.
IceTrailer is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
Search by string in DB
10/21/2012 - Rappelz Private Server - 10 Replies
ok i forgot the function to search the DB in sql by the scrips name to find items any help would be nice tyvm
[Visual Basic] [Problem] String auslesen/String zufällig wählen
05/06/2012 - General Coding - 4 Replies
Code: #include <GUIConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Name Generator", 236, 299, 815, 246) $Input1 = GUICtrlCreateInput("Username", 24, 72, 185, 21) $Input2 = GUICtrlCreateInput("Username", 24, 104, 185, 21) $Input3 = GUICtrlCreateInput("Username", 24, 136, 185, 21) $Input4 = GUICtrlCreateInput("Username", 24, 168, 185, 21) $Input5 = GUICtrlCreateInput("Username", 24, 200, 185, 21)
Linking a text string to action file
03/30/2012 - Facebook - 0 Replies
Hi guys, I need a little help. I am working on a hack for battle pirates and I am trying to figure out how to link a given group of characters typed into comms to an action file in order to execute it. I can understand if this isnt something that should be posted out in the open and that I probably should have posted this elsewhere. i just didnt know what else to do. Any help will be greatly appreciated. -Adam
C++ Dll mit AutoIt callen --> Return String bzw. Char
01/22/2011 - C/C++ - 5 Replies
Sers Com, Nicht Funktionierendes Beispiel: AutoIt: $string="h" $Returned=DllCall("Dll-Test.dll"," char:cdecl","string","char&quo t;,$string) MsgBox(0,"DLL-Test",$Returned) C++ Dll: extern "C"



All times are GMT +1. The time now is 16:42.


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.