Jump to content

c# MTA:SA Resource Generator


darkcruzer

Recommended Posts

Posted

Hey, guys i'm working on a tool in C# which is called MTA:SA Resource Generator in short MTASARG.

Functions:

Drag and Drop (example: id.txd, id.dff) from Skins, Cars and Weapons onto my tool and script.lua and meta.xml would be generated and packed automatically into a zip-file.

Everything works just fine but it seems MTA has some Problems with the generated meta.xml file.

ERROR: Couldn't parse meta file for resource 'your_resource'

Loading of resource 'your_resource' failed

Generated meta.xml looks like this:

  
<meta> 
    <info author="MTASARG" name="Skins, Cars, Weapons" /> 
    <file src="1.dff" type="client" /> 
    <file src="1.txd" type="client" /> 
</meta> 

So, but when i open meta.xml and save it with notepad, mta hasnt problems with it.

I think its a problem of encoding...

Anyone know how i can fix it?

Posted

UTF-8 should work fine. This is what I use for MTA:SE. Try ASCII and make sure the files are copied over to the resource. If it fails, you can try to use writer.WriteStartDocument(); as the first writing function.

Posted

I've found out that it dosnt extract the zip file correctly... when i open the folder resource-cache/unzipped i can find the folder of your_resource but it's empty.

So it must be my zipping function which makes the zip file corrupt...

Posted

He uses DotNetZip lib. Everything works fine as far as I know. I helped him via PM and maybe I didn't understand his problem.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...