I use this script to check if the player has favorited the game, however, nothing is happening. I tried printing the result, and this is what it came out:
Script:
function CheckIfPlayerFavoritedTheGame(plr)
local UserId = plr.UserId
local Name = plr.Name
local RawResponse = HttpService:GetAsync(string.format("https://games.roproxy.com/v2/users/%s/favorite/games?sortOrder=Asc&limit=10", tostring(UserId)))
local Response = HttpService:JSONDecode(RawResponse)
for _, obj in pairs(Response.data) do
print(obj)
if obj.id == game.PlaceId then
print(string.format("%s favorited the game! Yay!",Name))
end
end
end
What are you talking about? Both solutions achieve the same result and there is virtually no performance difference. Using string.format might just look “cleaner” and is more convenient to him than to concatenate 3 strings together.
First of all I can’t access the code right now, and second of all:
It’s a string if it has “”, it’s a number if it doesn’t, and is clearly a number digit.
It’s not that hard to wait until you can either I tested it without the tostring it doesn’t print, with it it does print, I also inputed manually the game Id and didn’t use the place Id and that works too.