Sora Posted March 6, 2013 Posted March 6, 2013 Hi , while i'm working on my new resource i had this weird error it's bothering me .. addEvent("set_a",true) addEventHandler("set_a",root, function (acl,right,access) if access ~= aclGetRight(aclGet(acl),right) then aclSetRight (aclGet(acl),right,access) aclSave() outputChatBox("* APM : right "..right.." have been set to "..access.." in "..acl.." .",source,0,255,0,true) else outputChatBox("* APM : right "..right.." is already "..access.." .",source,0,255,0,true) end end ) now the weird thing is that it's output APM : right ... etc but it does not set right and gives error bad argument @ aclSetRight note that acl,right,access are strings
Anderl Posted March 6, 2013 Posted March 6, 2013 Perhaps you aren't passing the right values to the event's function?
Sora Posted March 6, 2013 Author Posted March 6, 2013 No ,i think that it have passed the event function because the outputChatBox function worked perfectly with the vaules it maybe not passed to the event function if it haven't output anything but it did and this is the weird thing
Anderl Posted March 6, 2013 Posted March 6, 2013 By the way, just noticed now: third argument of aclSetRight (access) must be a boolean value, not a string.
Sora Posted March 6, 2013 Author Posted March 6, 2013 oh my bad i didn't notice it either, thank you ^^ .. what a stopped error which stops my whole work
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