Drakath Posted February 26, 2014 Share Posted February 26, 2014 local accName = getAccountName ( getPlayerAccount ( p ) ) Bad argument @ 'getAccountName' [Expected account at argument 1, got boolean] attempt to concatenate local 'accName' (a boolean value) How is it possible that getPlayerAccount returns false and how can I fix it? Link to comment
iPrestege Posted February 26, 2014 Share Posted February 26, 2014 Maybe because it's a guest account? Link to comment
Anubhav Posted February 26, 2014 Share Posted February 26, 2014 Lol. P isn't defined. I didn't defined it but this should work. local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) Link to comment
iPrestege Posted February 26, 2014 Share Posted February 26, 2014 ^ No sense 'thePlayer' is a variable it will not return for the player if the variable wasn't the player. Link to comment
pa3ck Posted February 26, 2014 Share Posted February 26, 2014 Lol.P isn't defined. I didn't defined it but this should work. local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) And where did you define 'thePlayer'? thePlayer is not the same as localPlayer in client side... You will ALWAYS need to define the player element ( except when using functions that return source as a player element ) Link to comment
Drakath Posted February 26, 2014 Author Share Posted February 26, 2014 I did define p. Link to comment
WASSIm. Posted February 26, 2014 Share Posted February 26, 2014 the player passed to the function is invalid o account guest i think Link to comment
iPrestege Posted February 26, 2014 Share Posted February 26, 2014 I did define p. if isGuestAccount ( getPlayerAccount ( p ) ) then return end local accName = getAccountName ( getPlayerAccount ( p ) ) You can try this and please make sure that it's not an guest account. Link to comment
Drakath Posted February 28, 2014 Author Share Posted February 28, 2014 Now I get: WARNING: Bad argument @ 'isGuestAccount' [Expected account at argument 1, got boolean] WARNING: Bad argument @ 'getAccountName' [Expected account at argument 1, got boolean] ERROR: attempt to concatenate local 'accName' (a boolean value) Link to comment
WhoAmI Posted February 28, 2014 Share Posted February 28, 2014 Show how u defined 'p'. Link to comment
myonlake Posted February 28, 2014 Share Posted February 28, 2014 Ugh, no. local account = ( getPlayerAccount( p ) and not isGuestAccount( getPlayerAccount( p ) ) ) and getPlayerAccount( p ) or false local account_name = account and getAccountName( account ) or "Unknown" 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