Dopery Posted March 1, 2014 Share Posted March 1, 2014 (edited) 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 March 2, 2014 by Guest Link to comment
Castillo Posted March 1, 2014 Share Posted March 1, 2014 Where do you get that error? Link to comment
Moderators Citizen Posted March 1, 2014 Moderators Share Posted March 1, 2014 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
Dopery Posted March 1, 2014 Author Share Posted March 1, 2014 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: Link to comment
Castillo Posted March 1, 2014 Share Posted March 1, 2014 Where exactly did you put these files? Link to comment
Dopery Posted March 1, 2014 Author Share Posted March 1, 2014 Where exactly did you put these files? In zip Link to comment
Castillo Posted March 1, 2014 Share Posted March 1, 2014 Inside the resources folder? Link to comment
Moderators Citizen Posted March 1, 2014 Moderators Share Posted March 1, 2014 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 ) faster because you don't need to update your zip file. Link to comment
Dopery Posted March 1, 2014 Author Share Posted March 1, 2014 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 ) 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 Link to comment
Moderators Citizen Posted March 1, 2014 Moderators Share Posted March 1, 2014 You're welcome. I really suggest you to keep your resource as a regular folder (not as a zip) while coding it. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now