Jump to content

Get player from account name (string)


lk12

Recommended Posts

Hey guys I'm having a little problem, I'm trying to get the player element from the account name that is a string.

I have tried:

Fail:

local host = getElementData(source, "HostedBy") 
local hoster = getAccountPlayer(getAccount(host))  
  
Debug: bad argument @ getAccountPlayer, expected account at argument 1 got boolean 

I also tried:

local host = getElementData(source, "HostedBy")-- This will return the account name as a string. 
local hoster = getAccountPlayer(host)-- here I'm trying to get the player from the account name string. 
  
debug: bad argument @ getAccountPlayer, expected account at argument 1 got string: "Lk12" 

Any help is much appreciated.

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...