SocialService Documentation Issues

The following links have a code sample at the bottom which uses block quotes:
https://developer.roblox.com/api-reference/function/SocialService/CanSendGameInviteAsync
https://developer.roblox.com/api-reference/function/SocialService/PromptGameInvite
Both are affected by the same issue.
Picture of the issue:

There also seems to be some other programming mistakes such as this line:

Should be:

local res, canSend = pcall(SocialService:CanSendGameInviteAsync(targetPlayer))

Another line:
Invite%20Error

Should be:

local res, canInvite = pcall(SocialService:PromptGameInvite(targetPlayer))
3 Likes

This topic was automatically closed after 16 minutes. New replies are no longer allowed.

Even this correction is not the right usage, both of those lines should either be this:

local res, canSend = pcall(function() return SocialService:CanSendGameInviteAsync(targetPlayer) end)

local res, canInvite = pcall(function() return SocialService:PromptGameInvite(targetPlayer) end)

or this:

local res, canSend = pcall(SocialService.CanSendGameInviteAsync, SocialService, targetPlayer)

local res, canInvite = pcall(SocialService.PromptGameInvite, SocialService, targetPlayer)

Also on the SocialService:CanSendGameInviteAsync page, there is a strange denotation of the RBXScriptSignal / Event:


and very similarly on SocialService:PromptGameInvite:

1 Like

Looks like an engineer wrote this and the publisher forgot to double check the code samples lol.
rbx::signal is the backend object for events.

3 Likes