Jump to content

Carregar XML em Client


Recommended Posts

Bom dia, 

 

Preciso de uma ajuda, eu tenho um sistema que eu fiz um modo Server.Lua e quero tirar ele e colocar como client so que da erro


AVISO: Bad argument @'xmlNodeGetChildren' [Expected xml-node at argument 1, got boolean]

blipBases = {}
addEvent("blipsMapsBases",true)
addEventHandler("blipsMapsBases",getRootElement(),function(typeB)
	if blipBases then
		for i,blip in pairs(blipBases)do
			destroyElement(blip)
		end
		blipBases = false
	end
	if tonumber(typeB) then
	if not blipBases then blipBases = {} end
	    xml2 = xmlLoadFile("others/Save/Saves/Panel/Bases.xml")
		for i,node in ipairs(xmlNodeGetChildren(xml2)) do -------------- AVISO AQUI
			if xmlNodeGetAttribute(node,"ownerAccount") == "AvailableBase" then
				local baseName = xmlNodeGetName(node)
				local baseCol = getBaseColshape(baseName)
				outputChatBox("OK")
			end
		end
		xmlUnloadFile(xml2)
	end
end)

 

Link to comment
  • Moderators

Verificou se nesse diretório do cache do cliente existe o arquivo xml? Senão tiver vai mostrar essa mensagem de erro. Se o arquivo não estiver sendo salvo no cliente ele não estará no cache, mas sim na pasta do servidor.

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