Jump to content

xmlLoadFile doesn't work in Client Side


Piorun

Recommended Posts

o_O...

If it's only server-side the wiki must be fixed...

Client

xmlnode xmlLoadFile ( string filePath )

Required Arguments

filePath: The filepath of the file in the following format: ":resourceName/path". 'resourceName' is the name of the resource the file is in, and 'path' is the path from the root directory of the resource to the file.

For example, if there is a file named 'settings.xml' in the resource 'ctf', it can be accessed from another resource this way: xmlLoadFile(":ctf/settings.xml").

If the file is in the current resource, only the file path is necessary, e.g. xmlLoadFile("settings.xml").

Link to comment

xml, file functions client side will look in the resource client side, the one you downloaded.

MTA San Andreas 1.1.1\mods\deathmatch\resources

xmlLoadFile ( ":resource/config.xml" )

Will look for config.xml in:

MTA San Andreas 1.1.1\mods\deathmatch\resources\resource\config.xml

The reason it didn't work in the first place, because the config.xml wasn't client side, when you specified it in the meta.xml, the client downloads it.

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