Jump to content

XML Scripting


#Paper

Recommended Posts

I have tried to create a specia of system in order to store of the points:

It must create a species of rows thus xml:

" points=""/>

I, with l' aid of the wiki I have created this script… but it does not work!

--   LOCALS   -- 
local xmlFile = xmlLoadFile ( "data.xml" ) 
local node = xmlCreateSubNode ( xmlFile, ..getPlayerName().. ) 
local success = xmlNodeSetValue ( node, ..DriftPointsNow.. ) 
-- END LOCALS -- 
  
function ( makeuserdata ) 
    if success then 
        xmlSaveFile ( xmlFile ) 
    end 
end 
end 
addEventHandler( "onPlayerJoin", getRootElement(), makeuserdata ) 

What's wrong? :?

P.S: And how I can make that every the 5 second scripts rewrites l' xml with the new number of points?

P.P.S: Sry for my bad english <_<

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