Well me and another scripter have been trying to make a different account system as the standard MTA one is bugged. We made it all and it worked fine to begin with but now it just gives lots of the same error on the same line. We can't work out what is wrong.
_getClientAccount = getClientAccount
function getClientAccount(source)
if xml then
local count = 0
local account = xmlFindSubNode(xml,"account",count)
local name = getClientName(source)
while (xmlNodeGetAttribute(account,"name") ~= name or false) do
count = count + 1
account = xmlFindSubNode(xml,"account",count)
end
if xmlNodeGetAttribute(account,"name") == name then
return account
end
end
return false
end
The line with the error on:
while (xmlNodeGetAttribute(account,"name") ~= name or false) do
with this error
Bad argument @ 'xmlNodeGetAttribute'