Jump to content

help in xml


Cyclone

Recommended Posts

well i m new to scripting ... i was trying a script xml..its seems my script is weird ,helpme

problem in script : my script only gets the first line in attr

when i was logined as 'kumar' it returns fail in console ,i dont know what to further

this is server side script

function settingg1(thePlayer,commandName,st)
claf = xmlLoadFile("player.xml")
if claf then
 
if st == "1" then
 
 
local guapo = xmlFindChild(claf,"guapo",0)
local apName = xmlNodeGetAttribute(guapo,"aName")
outputConsole(apName)
local accou = getPlayerAccount (thePlayer)
local acccname = getAccountName(accou)
 
if (acccname == apName) then
outputConsole("success")
else
outputConsole("fail")
 
end
end
end
 
 
end
addCommandHandler("set",settingg1)

and this is the player.xml file

<root>
   <guapo aName="bala" />
   <guapo aName="kumar" />
</root>

HELP

Note: sorry 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...