Erfanice Posted December 4, 2021 Posted December 4, 2021 (edited) Hi, I'm using XML to create a LOG https://wiki.multitheftauto.com/wiki/XmlFindChild But the main problem here is just (1) XML Pictures: XML: https://pasteboard.co/YU2m4gpnuWqT.png But I get something output OutputChatBox: https://pasteboard.co/zHgbIs18AHiZ.png I want to show all XML data, not just 1 data I hope you understand what I mean Edited December 4, 2021 by M.Wizard
The_GTA Posted December 4, 2021 Posted December 4, 2021 Hello M.Wizard, have you tried using the xmlNodeGetChildren function? It should return a table of all child nodes. Child nodes are inside of their parent nodes. Developer of Magic.TXD • Developer of MTA:Eir, Eir Lua • Company owner of EirDev
Erfanice Posted December 5, 2021 Author Posted December 5, 2021 @The_GTA This functionality that you provide gives OutPutChatBox randomly, I want to give them all like the image I gave [ https://pasteboard.co/YU2m4gpnuWqT.png ], I want to run test1 test2 test3 at the same time.
Moderators IIYAMA Posted December 5, 2021 Moderators Posted December 5, 2021 53 minutes ago, M.Wizard said: This functionality that you provide gives OutPutChatBox randomly Nope, it does not. Maybe you used too much of the example code? local messageNodes = xmlNodeGetChildren(xml) local outputText = "" for i,node in ipairs(messageNodes) do outputText = outputText .. tostring(xmlNodeGetValue(node)) .. "\n" end outputChatBox(outputText) 1 Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now