Jump to content

[LOCKED] Couldn't find resource archive or directory


Dopery

Recommended Posts

Hi

I creating my own script, ( private script, don't public ), and i receive this error when I launch the server :

  
ERROR: Couldn't find resource archive or directory 
  

This is my XML:

  
<meta> 
    <info author="Dopery" name="Base" version="1.0" type="script"/> 
    <script src="Main.lua" type="server" /> 
</meta> 
  

and my script/resource:

  
function hideHUD () 
    showPlayerHudComponent ( source, "ammo", false ) 
    showPlayerHudComponent ( source, "weapon", false ) 
    showPlayerHudComponent ( source, "armour", false ) 
    showPlayerHudComponent ( source, "breath", false ) 
    showPlayerHudComponent ( source, "clock", false ) 
    showPlayerHudComponent ( source, "health", false ) 
    showPlayerHudComponent ( source, "money", false ) 
    showPlayerHudComponent ( source, "wanted", false ) 
end 
  
addEventHandler ( "onPlayerJoin", getRootElement(), hideHUD ) 
  

Edited by Guest
Link to comment
  • Moderators

Make sure that the error is about your resource. If not, then do not care about it.

If it's about your resource, then make sure that "your xml" is called meta.xml and not Meta.xml or meta.xml.txt

On windows 7, the extensions aren't shown by default in the explorer.

A screenshot of what's is in your resource (not the code) would let us verify that last point (on the screenshot, be sure we can see the "Type" column ).

Regards,

Citizen

Link to comment
Where do you get that error?

I get the error when loads... say: [ERROR] Couldn't find resource archive or directory

Make sure that the error is about your resource. If not, then do not care about it.

If it's about your resource, then make sure that "your xml" is called meta.xml and not Meta.xml or meta.xml.txt

On windows 7, the extensions aren't shown by default in the explorer.

A screenshot of what's is in your resource (not the code) would let us verify that last point (on the screenshot, be sure we can see the "Type" column ).

Regards,

Citizen

I don't use Windows 7, I use Windows XP SP3

And here the content:

Dibujo_zps94670c57.png

Link to comment
  • Moderators

The error is not complete. I just checked the source code of MTA and here is the only similar string I found:

m_strFailureReason = SString ( "Couldn't find resource archive or directory (%s) for resource '%s'.\n", m_strResourceDirectoryPath.c_str (), m_strResourceName.c_str () ); 

- Your archive isn't a zip file or uses an unknown compression or has a password.

- Your archive file contains weird characters (don't use russian or polish caracters).

While developping a mod/script, there is no need for your resource to be a zip file, you can use folders instead:

- Go in your resources folder then create a folder myscript and put your meta.xml and Main.lua in it.

- Start the server and try to start your resource.

By keeping your resource as a regular folder, you can develop 5 times (totally a random number yeah xD) faster because you don't need to update your zip file.

Link to comment
The error is not complete. I just checked the source code of MTA and here is the only similar string I found:

m_strFailureReason = SString ( "Couldn't find resource archive or directory (%s) for resource '%s'.\n", m_strResourceDirectoryPath.c_str (), m_strResourceName.c_str () ); 

- Your archive isn't a zip file or uses an unknown compression or has a password.

- Your archive file contains weird characters (don't use russian or polish caracters).

While developping a mod/script, there is no need for your resource to be a zip file, you can use folders instead:

- Go in your resources folder then create a folder myscript and put your meta.xml and Main.lua in it.

- Start the server and try to start your resource.

By keeping your resource as a regular folder, you can develop 5 times (totally a random number yeah xD) faster because you don't need to update your zip file.

HUH, I remember...

When I creating my script... first I created a RAR, not ZIP... and I changed the extension, and here the problem.

Thanks xD

Link to comment

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...