santiago_baez Posted January 17, 2023 Share Posted January 17, 2023 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 Link to comment
Vampire Posted January 17, 2023 Share Posted January 17, 2023 Hello @santiago_baez and welcome! I've moved your topic to the Scripting section so you can get better assistance. 1 Link to comment
Shady1 Posted January 17, 2023 Share Posted January 17, 2023 1 hour ago, santiago_baez said: 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 Check acl.xml 'aclgroup' Check if ACL groups in the system are on the acl.xml side Link to comment
MYSOTO Posted January 17, 2023 Share Posted January 17, 2023 Remplace this line: if isObjectInACLGroup( "user." .. p[ player ].username, aclGetGroup( value.aclGroup ) ) and value.nametagColor then For this: if (isObjectInACLGroup( "user." .. p[ player ].username, aclGetGroup( groups[key].aclGroup ) ) and groups[key].nametagColor) then You can test this 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