Jump to content

ACL problem


Drakath

Recommended Posts

Posted

It says that it expected ACL at argument 1.

It outputs "got" and "NOT". What's the problem? I used an example from wiki but it doesn't work.

function func(thePlayer) 
  
local group = aclGetGroup("CustromACL") 
if group then 
   outputChatBox("got", thePlayer) 
end 
   local bool = aclRemoveRight(group,"command.kick") 
   aclReload() 
   if bool then 
   outputChatBox("removed", thePlayer) 
   else 
   outputChatBox("NOT", thePlayer) 
   end 
    
end 
addCommandHandler("remv", func) 

Posted (edited)

I did add the resource to Admin group. If it wouldn't have that right it would output Access denied error right?

Edited by Guest
Posted

Guess so. But it did fail. If I'm correct "if group then" will only fail if it's nil? Try "if (group ~= false) or (group ~= nil) then" and also be sure the ACL right does even exists.

Posted

If group is both for false and nil. The fact is that the right was not removed. This group does have command.kick

Besides, aclGetGroup does return me the ACL group since it does output "got".

Posted

Maybe it can only remove it from the ACL group? Stuff like user.lalala and I want to remove an actual right which is in ACL that just belongs to this group, however that does not explain why it gives me an error that it expected ACL in the first argument.

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