Register for your free account! | Forgot your password?

Go Back   elitepvpers > Silkroad Online > SRO Coding Corner
You last visited: Today at 02:33

  • 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: 91
Received Thanks: 23
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   #2
 
elite*gold: 0
Join Date: Sep 2017
Posts: 136
Received Thanks: 22
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   #3
 
elite*gold: 53
Join Date: Sep 2014
Posts: 91
Received Thanks: 23
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   #4
 
elite*gold: 0
Join Date: Sep 2017
Posts: 136
Received Thanks: 22
Why is the section so dead :v


#HB is offline  
Old   #5
 
elite*gold: 53
Join Date: Sep 2014
Posts: 91
Received Thanks: 23
Quote:
Originally Posted by #HB View Post
Why is the section so dead :v
Always sleeping
Mr.Awesome1337 is offline  
Old   #6
 
elite*gold: 0
Join Date: Apr 2008
Posts: 429
Received Thanks: 513
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   #7
 
elite*gold: 53
Join Date: Sep 2014
Posts: 91
Received Thanks: 23
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



« Previous Thread | Next Thread »

Similar Threads
[Help]Import Files to a .NOS file
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...
5 Replies - Nostale
[HOW TO] MSVCR110.dll fehlt BEHEBEN | [MSVCR120.dll MSVCP110.dll MSVCP100.dll etc]
Hier ist ein Youtube Video: MSVCR100.dll feht BEHEBEN / MSVCR110.dll fehlt MSVCR120.dll MSVCP110.dll MSVCP100.dll MSVCP120.dll - YouTube Aber den...
2 Replies - Tutorials
[Python Help] Import hack file in logininfo.py
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...
2 Replies - Metin2 PServer - Discussions / Questions
[HELP]Using SmartWHZ.DLL and hyperpeer.dll
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... ...
25 Replies - Soldier Front Philippines



All times are GMT +2. The time now is 02:33.


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.