boo871Join Date: 2014-01-18 Post Count: 142 |
I know you can do this with a few parameters:
http://www.roblox.com/Friends/JSON
But when you do that (and I'd need an external source since its on the roblox domain) the table is returned as a giant string
Is there a nicer way I could get a users friends before I try to create a massive string to table function |
|
ClirexJoin Date: 2012-06-22 Post Count: 2721 |
i was going to say :GetOnlineFriends() but then i realized what you asked for |
|
boo871Join Date: 2014-01-18 Post Count: 142 |
well GetOnlineFriends is better than spending hours on a string to table function, so it'll work for now
ty |
|
|
Could someone please spend hours doing this, I would like to do this also! |
|
UFAIL2Join Date: 2010-08-14 Post Count: 6905 |
Why would you have to spend hours doing this when Roblox has methods to decode JSON? |
|
|
Its not that hard just string patterns |
|
|
Ok, Ufail2, try and make this without spending HOUR(S)! |
|
|
for w in string.gmatch(s,[["UserId":%d+]]) do
print(w)
end |
|
|
local firendids = {}
for w in string.gmatch(s,[["UserId":%d+]]) do
table.insert(friendids,w:match("%d+"))
end |
|
ZawieJoin Date: 2010-07-04 Post Count: 6338 |
game:GetService"HttpService":JSONDecode()
is a function narb |
|
|
ZawieJoin Date: 2010-07-04 Post Count: 6338 |
game:GetService"HttpService":JSONDecode(JSONStringHere)
|
|
ZawieJoin Date: 2010-07-04 Post Count: 6338 |
local tab = game:GetService"HttpService":JSONDecode(JSONStringHere)
|
|