Skip to content
  • 0 Votes
    3 Posts
    1k Views
    G
    @JasonL Thanks, I ended up with this cloudCode: isForceCreate = String(data.callingMessage.forceCreate) == "true"; isNewUser = String(data.message.newUser) == "true"; var response = {}; response.status = 200; response.data = data.message; if (isForceCreate && isNewUser) { var min = 10000000, max = 999999999 prefix = ["player", "user", "member"] const num = Math.floor(Math.random() * (max - min + 1)) + min; const pre = prefix[Math.floor(Math.random() * prefix.length)]; var defaultPlayerName = pre + String(num); var playerStateProxy = bridge.getPlayerStateServiceProxy(); // We are changing the player name on the server. playerStateProxy.updatePlayerName(defaultPlayerName); // And in this API Call's return data. response.data.playerName = pre + String(num); } response; //return the object This works just the way I need
  • I didn't receive my registration email...

    Solved Portal Defects portal registration
    2
    0 Votes
    2 Posts
    2k Views
    Paul WinterhalderP
    Sadly, some spam filters don't like our registration emails. So be sure to check your spam filter - and whitelist @getbraincloud.com. If that doesn't help, contact support via the Green Chat widget, and we'll help you out! Paul.