wajsic Posted March 13, 2011 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!
Castillo Posted March 13, 2011 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? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
wajsic Posted March 13, 2011 Author Posted March 13, 2011 Still doesn't work. And yes, it's serverside,
Castillo Posted March 13, 2011 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 ) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Castillo Posted March 13, 2011 Posted March 13, 2011 Impossible, it's working fine here, are you logged in as "Admin"? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
wajsic Posted March 13, 2011 Author Posted March 13, 2011 (edited) Can you send me a .zip file or folder? Edited March 13, 2011 by Guest
Castillo Posted March 13, 2011 Posted March 13, 2011 I don't see why it would work here and not in your server. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
wajsic Posted March 14, 2011 Author Posted March 14, 2011 Thanks. I made it. The problem was at group name (sry, I'm noob)
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