Jump to content

xmlCopyFile function


Recommended Posts

Hello. Here's bit of simple client-side code:

default_file = xmlLoadFile("default.xml") 
new_file = xmlCopyFile(default_file,"new.xml") 

The idea is to obtain an exact copy of a "default.xml" file given, and to rename the copy into "new.xml". Both functions returns what they should, means not "false", but nothing named "new.xml" appears in client-side game mod directory. Where's mistake? It's very pity that some functions don't have according examples at MTA-wiki page, so I have to ask for help here. Hope someone can give me such a nice example.

Link to comment

Resource folder is "..\MTA San Andreas\server\mods\deathmatch\resources\testmod"

Just found that new.xml in "..\MTA San Andreas\mods\deathmatch", however it should be placed in "..\MTA San Andreas\mods\deathmatch\resources\testmod" as far as I understand. Still, can't see what's wrong. Don't have any Cyrillic in folders paths, if that matters.

As for xmlUnloadFile - sure, simply missed that in code, it doesn't affect anything, right?

Link to comment

This is weird... I never had problem with files being placed in "...\deathmatch\" directory. Might be an MTA bug.

So it's a client-side script, isn't it?

If you read carefully you'd see in the first post it's client-side -_-

Link to comment

Can't fight that, it keeps to create new file in "deathmatch" folder.. So there're "resources", Client.dll and that damn "localConfig.xml", which I need to be in other place. Can't believe that nobody ever faced with this. Am I the Chosen One? :-s

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