Drakath Posted April 9, 2015 Posted April 9, 2015 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)
Et-win Posted April 9, 2015 Posted April 9, 2015 Does the resource has the ACL permission to edit ACL groups?
Drakath Posted April 9, 2015 Author Posted April 9, 2015 (edited) I did add the resource to Admin group. If it wouldn't have that right it would output Access denied error right? Edited April 9, 2015 by Guest
Et-win Posted April 9, 2015 Posted April 9, 2015 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.
Drakath Posted April 9, 2015 Author Posted April 9, 2015 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".
Drakath Posted April 9, 2015 Author Posted April 9, 2015 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.
Addlibs Posted April 9, 2015 Posted April 9, 2015 You are confusing ACLs with ACL groups. You can't remove a right from an ACL group, you can remove right from an ACL. Try aclGet() instead of aclGetGroup() I've also fixed the example on aclRemoveRight cause it was wrong.
Drakath Posted April 9, 2015 Author Posted April 9, 2015 You are confusing ACLs with ACL groups. You can't remove a right from an ACL group, you can remove right from an ACL.Try aclGet() instead of aclGetGroup() I've also fixed the example on aclRemoveRight cause it was wrong. Thanks, it is working now.
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