I need help with this error: :
players\main.lua:44: Argumento erróneo @ 'isObjectInACLGroup' [grupo ACL esperado en el argumento 2, obtenido booleano]
----------------------------------------------------------------------
this is the main column: 44
addEvent( "onCharacterLogin", false )
addEvent( "onCharacterLogout", false )
--
local team = createTeam( "MTA: Paradise" ) -- this is used as a dummy team. We need this for faction chat to work.
p = { }
-- Import Groups
-- CONTRA PRIORITY MAS BAJO, QUIERE DECIR QUE TIENE MAS PRIORIDAD
local groups = {
{ groupName = "Developers", groupID = 1, aclGroup = "Desarrollador", displayName = "Desarrollador", nametagColor = { 0, 255, 60 }, priority = 2 },
{ groupName = "MTA Administrators", groupID = 2, aclGroup = "Administrador", displayName = "Administrador", nametagColor = { 127, 255, 127 }, priority = 1 },
{ groupName = "MTA Moderators", groupID = 17, aclGroup = "Moderador", displayName = "Moderador", nametagColor = { 247, 157, 47 }, priority = 4 },
{ groupName = "GameOperator", groupID = 3, aclGroup = "GameOperator", displayName = "GameOperator", nametagColor = { 255, 71, 71 }, priority = 3 },
{ groupName = "Helper", groupID = 12, aclGroup = "Helper", displayName = "Helper", nametagColor = { 3, 177, 252 }, priority = 5 },
}
local function updateNametagColor( player )
local nametagColor = { 127, 127, 127, priority = 100 }
if p[ player ] and isLoggedIn( player ) then
nametagColor = { 255, 255, 255, priority = 100 }
if getOption( player, "staffduty" ) then
for key, value in ipairs( groups ) do
if isObjectInACLGroup( "user." .. p[ player ].username, aclGetGroup( value.aclGroup ) ) and value.nametagColor then
if value.priority < nametagColor.priority then
nametagColor = value.nametagColor
nametagColor.priority = value.priority
end
end
end