Jump to content

Is it good to switch to XML?


MetaGamer

Recommended Posts

Posted

Well, if you are willing to save a lot of information, then it can be a problem in future, as the file will be too big, and may take a some time to read it when needed.

Why not use SQLITE functions? or mysql.

Posted

well I need to get information of the players to the website which can't be done on SQLite(Is there any remote method?)

And in mysql there is many security issues.

Posted
There aren't any security issues, unless you cause them. MySQL is the only good solution.

how is the speed compared to the default mta sa saving system? (BTW I am using Premium Web Hosting)

Posted

I am always getting this error whenever I try to run my server

  
ERROR: Unable to connect to mysql: (2013) Lost connection to MySQL server at 'waiting for initial communication packet', system error: 0 
  

Posted
  
function MysqlInit() 
    handler = mysql_connect("", "", "", "", "") -- Establish the connection 
    if ( not handler ) then -- The connection failed 
      outputDebugString("Unable to connect to the MySQL server") 
    else 
      mysql_close(handler) -- Close the connection 
    end 
end 
addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), MysqlInit) 
  

Posted

Now another error

  
Not starting resource freemind as  section in the meta.xml is incorrect or missing (expected at least server 1.1.1-9.03328 because of 'dbConnect') 
  

Posted

Just for the record, XML will almost always be worse for anything that isn't configuration information - if you expect the information you want to save to change often (e.g. new players joining, etc), then it's a bad choice. If you want to quickly find an item, then it's a bad choice. If you just want to load something up on server start up, then it's fine.

Every time you save an XML file you rewrite the entire file, which takes quite some time.

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