Jump to content

[HELP] What wrong with xml save?


Turbesz

Recommended Posts

Posted

i use xmldata script to save datas to xml file, but now does not work... the file was created successfully, but i cant load the datas from the xml file. 

local xml = exports.xmldata

function save()
    local veh = getPedOccupiedVehicle(localPlayer)
    local hand = getVehicleHandling(veh)

    xml:xmlSaveData("asd", hand, false,true)
end

addCommandHandler("test",save)

function loadx ()
    local saved = xml:xmlLoadData ( "asd", false, true)

    for k, v in ipairs(saved) do
        outputChatBox(v)
    end

end

addCommandHandler("load",loadx)

And i want to save more than one handling to xml file, but i can insert only 1 to the file, when i try to save another one then overwrites the previous one...

what wrong? how can i load the data, and insert more handling to the file?

What if the only way not to feel bad, is to stop feeling, anything at all, forever?
- Hannah Baker

I cost a girl her life because I was afraid to love her...
- Clay Jensen

 ~ 13 Reasons Why

Posted

i found a solution, this topic can be locked/moved

What if the only way not to feel bad, is to stop feeling, anything at all, forever?
- Hannah Baker

I cost a girl her life because I was afraid to love her...
- Clay Jensen

 ~ 13 Reasons Why

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...