lk12 Posted September 14, 2013 Posted September 14, 2013 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.
MTA Team qaisjp Posted September 14, 2013 MTA Team Posted September 14, 2013 check the account actually exists. try to do each function separately and output each response individually. the code looks fine o me.
lk12 Posted September 14, 2013 Author Posted September 14, 2013 Thank you I think it works, Just waiting to test it and ill get back.
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