djharbi2 Posted March 21, 2018 Posted March 21, 2018 (edited) local players = getElementsByType("player") for key, value in ipairs(players) do local username = string.lower(tostring(getAccountName(value))) if (string.find(username, string.lower(tostring(guiGetText(theEditBox))))) and (guiGetText(theEditBox)~="") then count = count + 1 found = value foundstr = getAccountName(found) foundid = getElementData(found, "dbid") end end my goal is to pull the players' accounts and have them checked but here get Account Name does not mean Edited March 21, 2018 by djharbi2
Dimos7 Posted March 21, 2018 Posted March 21, 2018 local players = getElementsByType("player") for key, value in ipairs(players) do local username = string.lower(tostring(getAccountName(getPlayerAccount(value) ))) if (string.find(username, string.lower(tostring(guiGetText(theEditBox))))) and (guiGetText(theEditBox)~="") then count = count + 1 found = value foundstr = getAccountName(getPlayerAccount(found)) foundid = getElementData(found, "dbid") end end
MIKI785 Posted March 22, 2018 Posted March 22, 2018 What about debug? You should be getting errors as you're trying to call getAccountName/getPlayerAccount - both are nil on the clientside. I suggest you store the account name using element data, then you may access it from the clientside.
Discord Moderators Pirulax Posted March 23, 2018 Discord Moderators Posted March 23, 2018 Collect the data on server-side, send it to client-side.
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