Big Smoker Posted December 27, 2017 Share Posted December 27, 2017 (edited) Eu to editando meu painel de criar base e to antes nao tinha como alterar a senha da base pelo painel e acabei criando 1 so que que estou com problema na hora de salvar no xml no caso substituir a senha que ja conta no xml por uma nova veja se esta correto e por favor me ajuda a resolver addEvent("editGate",true) addEventHandler("editGate",getRootElement(),function(baseName,gateName,pass) local xml = xmlLoadFile("Bases.xml") for i,node in pairs(xmlNodeGetChildren(xml))do if xmlNodeGetName(node) == baseName then local gateInfo = xmlFindChild(node,"baseName") local gate = xmlFindChild(gateInfo,"Gates") local gates = xmlFindChild(gate,gateName:gsub(" ","Space"),0) if gates then xmlNodeSetAttribute(gates,"pass",pass) end xmlSaveFile(xml) alert("Base edited!",source) end end xmlUnloadFile(xml) refreshGates(baseName) end) um exemplo do meu xml é esse aqui quando salva <Gates> <PortãoSpacedaSpaceFrente X="-95.199996948242" Y="-2180.1999511719" Z="30.5" RX="0" RY="0" RZ="0" openMode="Up/Down" objectScale="1" moveScale="5" pass="1" modelID="2938"></PortãoSpacedaSpaceFrente> <Teto X="-38.799999237061" Y="-2180.3000488281" Z="37.590000152588" RX="0" RY="0" RZ="180" openMode="West/East" objectScale="1" moveScale="-30" pass="2" modelID="6959"></Teto> </Gates> Edited December 27, 2017 by felipebaidoloko Link to comment
Other Languages Moderators Lord Henry Posted December 29, 2017 Other Languages Moderators Share Posted December 29, 2017 (edited) On 27/12/2017 at 18:48, felipebaidoloko said: um exemplo do meu xml é esse aqui quando salva <Gates> <PortãoSpacedaSpaceFrente X="-95.199996948242" Y="-2180.1999511719" Z="30.5" RX="0" RY="0" RZ="0" openMode="Up/Down" objectScale="1" moveScale="5" pass="1" modelID="2938"></PortãoSpacedaSpaceFrente> <Teto X="-38.799999237061" Y="-2180.3000488281" Z="37.590000152588" RX="0" RY="0" RZ="180" openMode="West/East" objectScale="1" moveScale="-30" pass="2" modelID="6959"></Teto> </Gates> Não use acentos nos nomes, exceto se for uma string. A senha do portão fica no pass? Edited December 29, 2017 by Lord Henry Link to comment
Big Smoker Posted December 30, 2017 Author Share Posted December 30, 2017 sim fica no pass e nao to consigo alterar a senha do pass no xml Link to comment
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