Hello. I am trying to retrieve the display name but I fail horribly...can you help me on this one? Here is my code snippet:
void UGameSparkStatics::AccountDetailsRequest_Response(GameSparks::Core::GS & gs, const GameSparks::Api::Responses::AccountDetailsResponse & resp)
{
if (initialized && !resp.GetHasErrors())
displayname = resp.GetDisplayName();
}
And here is the declaration of display name:
static FString displayname;
I have also tried gsstl::string as the documentation suggest but with no luck. (I can't convert Optional::t_String to std:string)
Thank you very much!
In their Plugin, they do it like this:if(wrappedData.ContainsKey("displayName")){
HasDisplayName = true;
DisplayName = FString(UTF8_TO_TCHAR(wrappedData.GetString("displayName").GetValue().c_str()));
where "wrappedData" is "const GameSparks::Core::GSData& wrappedData".
Maybe that helps you (:
This works. Thank you very much! :)
Hello! I'm using successfully this code:
FString displayName = response.GetDisplayName().GetValue().c_str();
A greeting!
Adrian Popovicu
Hello. I am trying to retrieve the display name but I fail horribly...can you help me on this one? Here is my code snippet:
void UGameSparkStatics::AccountDetailsRequest_Response(GameSparks::Core::GS & gs, const GameSparks::Api::Responses::AccountDetailsResponse & resp)
{
if (initialized && !resp.GetHasErrors())
displayname = resp.GetDisplayName();
}
And here is the declaration of display name:
static FString displayname;
I have also tried gsstl::string as the documentation suggest but with no luck. (I can't convert Optional::t_String to std:string)
Thank you very much!
In their Plugin, they do it like this:
if(wrappedData.ContainsKey("displayName")){
HasDisplayName = true;
DisplayName = FString(UTF8_TO_TCHAR(wrappedData.GetString("displayName").GetValue().c_str()));
}
where "wrappedData" is "const GameSparks::Core::GSData& wrappedData".
Maybe that helps you (:
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstCedric Neukirchen
In their Plugin, they do it like this:
if(wrappedData.ContainsKey("displayName")){
HasDisplayName = true;
DisplayName = FString(UTF8_TO_TCHAR(wrappedData.GetString("displayName").GetValue().c_str()));
}
where "wrappedData" is "const GameSparks::Core::GSData& wrappedData".
Maybe that helps you (:
1 person likes this
Adrian Popovicu
This works. Thank you very much! :)
Anderson Rubio
Hello! I'm using successfully this code:
A greeting!
-
Documentation Notes
-
Design issues with user events
-
Using NoSQL
-
Runtime Collections vs Metadata Collections
-
Anonymous authentication from browser app
-
Modules
-
Movement With Unity
-
Problem with url parameters for downloadables
-
Querying NoSql GameSparks database
-
Challenge accesType
See all 2486 topics