Register for your free account! | Forgot your password?

Go Back   elitepvpers > Silkroad Online > SRO Coding Corner
You last visited: Today at 23:03

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


[Help] with import a file using PK2Writer.dll

Reply
 
Old   #1
 
elite*gold: 53
Join Date: Sep 2014
Posts: 103
Received Thanks: 36
Post [Help] with import a file using PK2Writer.dll

I'm trying to import a file using PK2Writer.dll but nothing is happend

here is the code:
Code:
            PK2Writer.Initialize(Environment.CurrentDirectory + @"\GFXFileManager.dll");
            PK2Writer.Open(Environment.CurrentDirectory + @"\Media.pk2", "169841", 6);
            PK2Writer.ImportFile(Environment.CurrentDirectory + @"Media\server_dep\silkroad\textdata\itemdata_25000.txt", "itemdata_25000.txt");
            PK2Writer.Close();
            PK2Writer.Deinitialize();
            Console.WriteLine("Done");
and i try to change the path of GFx dll or write any name to test if the code is working or not but it give me Done if i wrote any name or invaild path



Mr.Awesome1337 is offline  
Old 02/10/2018, 20:44   #2
 
elite*gold: 0
Join Date: Sep 2017
Posts: 334
Received Thanks: 65
You can use the function try & catch to know where the problem is just like this:

Code:
try
{
 PK2Writer.Initialize(Environment.CurrentDirectory + @"\GFXFileManager.dll");
            PK2Writer.Open(Environment.CurrentDirectory + @"\Media.pk2", "169841", 6);
            PK2Writer.ImportFile(Environment.CurrentDirectory + @"Media\server_dep\silkroad\textdata\itemdata_25000.txt", "itemdata_25000.txt");
            PK2Writer.Close();
            PK2Writer.Deinitialize();
            Console.WriteLine("Done");
}
catch (Exception ex) { Console.WriteLine("Catched a problem:" + Convert.ToString(ex)); }


#HB is offline  
Old 02/11/2018, 16:19   #3
 
elite*gold: 53
Join Date: Sep 2014
Posts: 103
Received Thanks: 36
Quote:
Originally Posted by #HB View Post
You can use the function try & catch to know where's the problem just like this:

Code:
try
{
 PK2Writer.Initialize(Environment.CurrentDirectory + @"\GFXFileManager.dll");
            PK2Writer.Open(Environment.CurrentDirectory + @"\Media.pk2", "169841", 6);
            PK2Writer.ImportFile(Environment.CurrentDirectory + @"Media\server_dep\silkroad\textdata\itemdata_25000.txt", "itemdata_25000.txt");
            PK2Writer.Close();
            PK2Writer.Deinitialize();
            Console.WriteLine("Done");
}
catch (Exception ex) { Console.WriteLine("Catched a problem:" + Convert.ToString(ex)); }
Same didn't give me an error
Mr.Awesome1337 is offline  
Old 02/12/2018, 17:15   #4
 
elite*gold: 0
Join Date: Sep 2017
Posts: 334
Received Thanks: 65
Why is the section so dead :v


#HB is offline  
Old 02/13/2018, 10:34   #5
 
elite*gold: 53
Join Date: Sep 2014
Posts: 103
Received Thanks: 36
Quote:
Originally Posted by #HB View Post
Why is the section so dead :v
Always sleeping
Mr.Awesome1337 is offline  
Old 02/13/2018, 18:28   #6
 
elite*gold: 0
Join Date: Apr 2008
Posts: 458
Received Thanks: 585
Your import command is wrong.
Code:
PK2Writer.ImportFile("path\\and\\file\\in\\container\\itemdata.txt, "path\\and\\file\\on\\local\\disk\\itemdata.txt);
Change your first argument to be the path in the pk2 and your second argument to point to the file on your disk.
florian0 is offline  
Old 02/14/2018, 16:41   #7
 
elite*gold: 53
Join Date: Sep 2014
Posts: 103
Received Thanks: 36
Quote:
Originally Posted by florian0 View Post
Your import command is wrong.
Code:
PK2Writer.ImportFile("path\\and\\file\\in\\container\\itemdata.txt, "path\\and\\file\\on\\local\\disk\\itemdata.txt);
Change your first argument to be the path in the pk2 and your second argument to point to the file on your disk.
Thanks.. So much
##Solved


Mr.Awesome1337 is offline  
Reply



« Speedattack Bug - Stall, Exchange, Reset Button | [request] packets »

Similar Threads
[Help]Import Files to a .NOS file
04/15/2017 - Nostale - 5 Replies
Hi ! I have a problem, I wanted to import some files from an old client .NOS file (NSipData) to the new Client but i dont know how to import the files. I tried some Tools to do it but when i login into the game there are no changes :/ I wanted...
[HOW TO] MSVCR110.dll fehlt BEHEBEN | [MSVCR120.dll MSVCP110.dll MSVCP100.dll etc]
03/25/2014 - Tutorials - 2 Replies
Hier ist ein Youtube Video: MSVCR100.dll feht BEHEBEN / MSVCR110.dll fehlt MSVCR120.dll MSVCP110.dll MSVCP100.dll MSVCP120.dll - YouTube Aber den ganzen Kram könnt ihr auch als Text haben: Viele von euch kennen bestimmt das Problem das ne dll...
[Python Help] Import hack file in logininfo.py
07/30/2013 - Metin2 PServer - Discussions / Questions - 2 Replies
I want to import my python hack with logininfo.py file, but, when i try to import it, it does an LOG error, but, if i rename the hack file to logininfo.py the hack open. http://i45.tinypic.com/2ex6883.jpg Any one can help ? :(
[HELP]Using SmartWHZ.DLL and hyperpeer.dll
04/08/2011 - Soldier Front Philippines - 25 Replies
hello .. sir ask ko lng po ,, ung gmit ko pong wallhack eh ung" smartwhz and hyperpeer" dll's after po ng 20mins connection been lost po... :( im using double mounting method can any one helps me? tnx



All times are GMT +2. The time now is 23:03.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2018 elitepvpers All Rights Reserved.