x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Steam leaderboard integration works on PC, fails on Mac

Following Steam's instructions at https://partner.steamgames.com/doc/features/leaderboards/guide I implemented a leaderboard in my game on PC and it works. Now I am trying to edit my game on a Mac but the editor fails with errors in the logs.

Leaderboard.cpp:


void CSteamLeaderboards::FindLeaderboard( const char *pchLeaderboardName ) {
    m_CurrentLeaderboard = NULL;
    SteamAPICall_t hSteamAPICall = SteamUserStats()->FindLeaderboard(pchLeaderboardName);  
    m_callResultFindLeaderboard.Set(hSteamAPICall, this, &CSteamLeaderboards::OnFindLeaderboard); 
}

Errors:


/Users/.../UE_4.21/Engine/Source/ThirdParty/Steamworks/Steamv139/sdk/public/steam/steamtypes.h:99:9: error: 'ARRAY_COUNT' macro redefined [-Werror,-Wmacro-redefined]
#define ARRAY_COUNT(COUNTER) CLANG_ATTR( "array_count:" #COUNTER ";" )
        ^
/Users/.../UE_4.21/Engine/Source/Runtime/Core/Public/Templates/UnrealTemplate.h:153:9: note: previous definition is here
#define ARRAY_COUNT( array ) (sizeof(ArrayCountHelper(array)) - 1)
        ^
In file included from /Users/.../UE_4.21/Engine/Source/ThirdParty/Steamworks/Steamv139/sdk/public/steam/isteamuserstats.h:13:
In file included from /Users/.../UE_4.21/Engine/Source/ThirdParty/Steamworks/Steamv139/sdk/public/steam/isteamclient.h:14:
/Users/.../UE_4.21/Engine/Source/ThirdParty/Steamworks/Steamv139/sdk/public/steam/steamtypes.h:99:9: error: 'ARRAY_COUNT' macro redefined [-Werror,-Wmacro-redefined]
#define ARRAY_COUNT(COUNTER) CLANG_ATTR( "array_count:" #COUNTER ";" )
        ^
/Users/.../UE_4.21/Engine/Source/Runtime/Core/Public/Templates/UnrealTemplate.h:153:9: note: previous definition is here
#define ARRAY_COUNT( array ) (sizeof(ArrayCountHelper(array)) - 1)
        ^
/Users/.../Leaderboard.cpp:6:25: error: implicit conversion of NULL constant to 'SteamLeaderboard_t' (aka 'unsigned long long') [-Werror,-Wnull-conversion]
        m_CurrentLeaderboard = NULL;
                             ~ ^~~~
                               0

There are no errors when opening this game in the editor on PC, but on a Mac the editor throws these errors and fails to open the game. Xcode version 10.1, OS Mojave 10.14.2

Product Version: UE 4.21
Tags:
more ▼

asked Dec 15 '18 at 04:19 AM in C++ Programming

avatar image

HighlandScotch
18 2 4

(comments are locked)
10|2000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question