goodiewarrior Posted March 10, 2016 Share Posted March 10, 2016 I do not understand why these lines do not work. Debugscript 3 says: Bad argument @ 'isObjectInACLGroup' [Expected acl-group at argument 2, got boolean] How? The second argument is aclGetGroup ("Admin"), so why doesn't it work? function ACLCheck(player, command) local account = getAccountName(getPlayerAccount(player)) local arena = getElementData(player, "Arena") if isObjectInACLGroup ( "user." .. account, aclGetGroup("Admin")) then --bugged return true end ------------- end I tried to output account and tostring(account), BOTH worked. I tried to output "Awesome" if I got the Admin ACL Group, and guess what? if not aclGetGroup("Admin") then outputChatBox("Awesome") This worked, so the script does not receive the acl group. WHY? PD: and yes, the Admin group exists. I even tried with Console group, too. Link to comment
Noki Posted March 11, 2016 Share Posted March 11, 2016 I tried to output "Awesome" if I got the Admin ACL Group, and guess what? if not aclGetGroup("Admin") then outputChatBox("Awesome") That code will output 'Awesome' if the ACL group does not exist. You used 'if not aclGetGroup("Admin")'. outputDebugString("Does 'Admin' group exist? "..tostring(aclGetGroup("Admin"))) If it outputs false or nil, it doesn't exist. If it outputs something like 'userdata', it's an ACL group. Link to comment
goodiewarrior Posted March 11, 2016 Author Share Posted March 11, 2016 I tried to output "Awesome" if I got the Admin ACL Group, and guess what? if not aclGetGroup("Admin") then outputChatBox("Awesome") That code will output 'Awesome' if the ACL group does not exist. You used 'if not aclGetGroup("Admin")'. outputDebugString("Does 'Admin' group exist? "..tostring(aclGetGroup("Admin"))) If it outputs false or nil, it doesn't exist. If it outputs something like 'userdata', it's an ACL group. Thanks, I found out the group Admin didn't exist. And then I added it via the admin panel, and I searched a bit and found out that I was using a file called "editor_acl", because I was testing out with the MTA Editor. Is this normal or it must be changed? Will it use the normal acl if I start MTA Server.exe? 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