wajsic Posted March 13, 2011 Share Posted March 13, 2011 Hello! I have a problem. I have wrote this script: addCommandHandler ( "wajsic", function (thePlayer) local accountname = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "admin" ) ) then setElementPosition( thePlayer, 1257.8564453125, -775.72027587891, 92.03125 ) end end ) Problem is that I get an error: \script.lua: attempt to concatenate global 'accountname' (a nil value) What could it be? Thanks! Link to comment
Castillo Posted March 13, 2011 Share Posted March 13, 2011 addCommandHandler ( "wajsic", function (thePlayer) local account = getPlayerAccount ( thePlayer ) if account then local accountname = getAccountName ( account ) if isObjectInACLGroup ( "user." .. tostring(accountname), aclGetGroup ( "admin" ) ) then setElementPosition( thePlayer, 1257.8564453125, -775.72027587891, 92.03125 ) end end end ) Try that. Btw, you are doing it server side, right? Link to comment
wajsic Posted March 13, 2011 Author Share Posted March 13, 2011 Still doesn't work. And yes, it's serverside, Link to comment
Castillo Posted March 13, 2011 Share Posted March 13, 2011 I found your problem, you put as group: "admin" but it's "Admin" with big A addCommandHandler ( "wajsic", function (thePlayer) local account = getPlayerAccount ( thePlayer ) if account then local accountname = getAccountName ( account ) if isObjectInACLGroup ( "user." .. tostring(accountname), aclGetGroup ( "Admin" ) ) then setElementPosition( thePlayer, 1257.8564453125, -775.72027587891, 92.03125 ) end end end ) Link to comment
wajsic Posted March 13, 2011 Author Share Posted March 13, 2011 I still get no respond Link to comment
Castillo Posted March 13, 2011 Share Posted March 13, 2011 Impossible, it's working fine here, are you logged in as "Admin"? Link to comment
wajsic Posted March 13, 2011 Author Share Posted March 13, 2011 (edited) Can you send me a .zip file or folder? Edited March 13, 2011 by Guest Link to comment
proracer Posted March 13, 2011 Share Posted March 13, 2011 Make sure you have ACL group called: "Admin". Link to comment
Castillo Posted March 13, 2011 Share Posted March 13, 2011 I don't see why it would work here and not in your server. Link to comment
wajsic Posted March 14, 2011 Author Share Posted March 14, 2011 Thanks. I made it. The problem was at group name (sry, I'm noob) 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