05/15/2024 15:19:45

Problem description

When I log in MSDK, it returns "retCode": 20,"retMsg": "Need real name auth"

Cause of the problem

The current protocol with the central control side is designed like this. In no matter whichever scene of the central control (such as real-name registration, curfew, anti-addiction, face recognition, etc.), the relevant requests of the central control side are made through MSDK. MSDK will return the return result of the central control synchronically to the game client. The specific manifestation is that the error code "retCode" returned during you log into MSDK is: 0, 20 and 21

Solution

Give the conclusion at first: During the login process, the game side does not need to pay attention to handling the scenario where retCode is 20. Only when retCode is 0 is the player allowed to log into the server directly (here only for the authorized login scenario; the retCode returned in the account inconsistency scenario needs to be analyzed according to the error code)

There are usually two scenarios where "retCode: 20" is returned:
(1) After "retCode: 20" is returned, a login callback with "retCode: 0" is returned
(2) After "retCode: 20" is returned, no other login callback is returned

Among them, Scenario (1) means that the player can log in the game normally. The central control has some other logical judgments about the player, so this does not affect the player's normal entry into the game. Thus, there is no need to judge and handle the error code "retCode: 20" at this scenario. Scenario (2) means that the player does not meet the condition for entering the game at this time. Generally speaking, the central control will pop up a window to remind the player of why the play does not meet the condition for entering the game. The player is not allowed to enter the game at this time, so there is no need to judge the error code "retCode: 20"

Conclusion: During the login process, just pay attention to whether the login callback returns "retCode: 0". If it returns "retCode: 0", this means to allow the player to log in the game and then proceed with the subsequent login process.



Copyright © 2024 MSDK.
All rights reserved.

results matching ""

    No results matching ""