• Categories
  • Recent
  • Tags
  • Popular
  • Solved
  • Unsolved
  • Users
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Darkly)
  • No Skin
Collapse
brainCloud Forums
    • All Topics
    • New Topics
    • Watched Topics
    • Unreplied Topics
    • All categories
    • All tags
    Load new posts
Log in to post
  • G

    Execute script when new user is registered

    Scheduled Pinned Locked Moved Cloud Code cloud code script registration authentication
    3
    0 Votes
    3 Posts
    522 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

  • J

    Convert Anonymous to username/password

    Scheduled Pinned Locked Moved APIs unity authentication
    2
    0 Votes
    2 Posts
    390 Views
    J

    Call AttachUniversalIdentity() method from client lib, the username is uniqueness enforced.

  • J

    Timeout for email validation?

    Scheduled Pinned Locked Moved Feature Suggestions account validation email cloudcode
    1
    0 Votes
    1 Posts
    490 Views
    No one has replied
  • A

    Unity SDK: Android build crash with Minify option enabled

    Scheduled Pinned Locked Moved Client API Defects unity minify android
    2
    0 Votes
    2 Posts
    388 Views
    A

    Hi,
    I temporarily solved it by adding this line in the proguard_user:

    -keep class com.braincloud.unity.* { *; }

    so the BrainCloud classes are no longer minified.

  • T

    Does a Pre-hook consume an extra API call?

    Scheduled Pinned Locked Moved General cloud code
    7
    0 Votes
    7 Posts
    492 Views
    A

    @Ben-Morris unfortunately yes
    they promised to solve it in BC 5.0 though

  • G

    bridge.include doesn't exists

    Scheduled Pinned Locked Moved Cloud Code bug
    2
    0 Votes
    2 Posts
    432 Views
    J

    Hey, there must be some syntax error in your script, would you be able to provide your script code here?

  • B

    Gamesparks Migration - Authentication Questions

    Scheduled Pinned Locked Moved General unity authentication gamesparks
    1
    0 Votes
    1 Posts
    227 Views
    No one has replied
  • Paul WinterhalderP

    brainCloud 4.11 is coming!

    Scheduled Pinned Locked Moved General release 4.11 braincloud
    1
    0 Votes
    1 Posts
    151 Views
    No one has replied
  • Kenneth LightnerK

    HTTP Client API - DELETE calls

    Scheduled Pinned Locked Moved Cloud Code cloudscript
    3
    0 Votes
    3 Posts
    407 Views
    Kenneth LightnerK

    Delete call update and everything is working now. Thanks!

  • C

    How to create a private system entity from cloud code?

    Scheduled Pinned Locked Moved Cloud Code global entities cloud code
    1
    0 Votes
    1 Posts
    298 Views
    No one has replied
  • dhptD

    Steam StartPurchase: No docs, no success

    Scheduled Pinned Locked Moved APIs steam startpurchase microtx marketplace products start purchase
    2
    0 Votes
    2 Posts
    498 Views
    J

    Hi Dylan, actually, the argument purchaseData for StartPurchase() method takes the Steam Item ID (from Edit Price Entry pop-up) as the input field (not the Item ID from the product list)
    7e9ff7b1-1854-4a48-8e38-d219501da3fd-image.png

  • G

    Clear and recalculate user milestones : rewards are replayed

    Scheduled Pinned Locked Moved General monitoring gamification
    1
    0 Votes
    1 Posts
    118 Views
    No one has replied
  • H

    How to add to an array in Cloud Code?

    Scheduled Pinned Locked Moved Cloud Code function push cloud code script array cloud code
    2
    0 Votes
    2 Posts
    429 Views
    H

    I posted this almost 13 days ago with zero answers, so I took some time to look through a bunch of documentation and did a ton of trial and error. Please Braincloud for the love of god add this to your API.

    Rhino does not handle Arrays the way that other coding languages do.

    I figured it out, unlike most arrays that return an array after you call push- Rhino returns the new length. So if you call push, don't set it's value.

    var copyArray = []; //I assume this line tells it to be an array for (var i = 0; i < postResult.data..length; i++) { copyArray[i] = postResult.data[i]; //arrays do not behave like .Net arrays, you can change length without initializing, so you just set each index to the index of the array you're copying } copyArray.push(variableToAdd); //Do NOT set this as the value of your array, the push method returns an int (length of array) NOT an array! //you probably dont need to call push at all to add to the array as shown in the for loop above if you already know your length or want a specific length

    Then just set your value to the variable, like this

    var entityData = { "variableName": copyArray }; //No need to call Array(copyArray) or any of the prototype. slice stuff. If you call Array() you'll just nest the array a second time.

    Use this page for further info on functions you can do with arrays.

  • M

    API for managing CloudCode scripts and API hooks

    Scheduled Pinned Locked Moved Feature Suggestions continuous integrati api deployment
    8
    1 Votes
    8 Posts
    857 Views
    J

    Hi,
    Any updates on what's coming up on the Builder API?
    I've been using it so far to automate the deployment of cloudscripts during development and has been a great time saver so far. I'd like to know or if you have some kind of a timeframe of when we can expect "Global Properties" to be available. Cause having would allows us to automate deployment of configuration files too.

    Also, is the Builder API going to able to make calls to interact with entities? We're migrating from gamesparks, and a useful tool for liveops was to build custom screens that would serve as tools for interacting with user data. Since Braincloud doesn't have that feature, we're looking into rebuilding those screens in Unity, but the missing piece of the puzzle is that we need a way to have access to entity data.

    Thank you for your time!
    J.B.

  • K

    How to access Lobby Data in a Lobby Filter script?

    Scheduled Pinned Locked Moved Cloud Code cloudscript lobbyid lobby
    1
    0 Votes
    1 Posts
    377 Views
    No one has replied
  • dhptD

    Swap serialization tutorials to utilize Newtonsoft

    Scheduled Pinned Locked Moved Feature Suggestions docs serialization tutorials
    1
    0 Votes
    1 Posts
    394 Views
    No one has replied
  • L

    Leaderboard score range

    Scheduled Pinned Locked Moved General leaderboard
    1
    0 Votes
    1 Posts
    128 Views
    No one has replied
  • Imperium42I

    Don't discourage modulation by charging per in-house calls

    Scheduled Pinned Locked Moved Feature Suggestions suggestion prices cloudscript price tiers cloud code script script
    5
    0 Votes
    5 Posts
    696 Views
    Imperium42I

    These points above are indeed good examples regarding "forcing bad practices":

    If I have 3 free API calls after the API call, after the 3rd freebie, I can return it and call again for 1 core + 3 more that can branch off again. This is inefficient for BC, yet beneficial for end-users (thus, forcing bad practices since it costs and gives more if we avoid the pre and post hooks).

    If a workaround to save API costs would be more work for the user, and costs more for BC, that's a lose-lose. If such a "hole" exists, shouldn't it be repriced for that consideration to make it the win-win you folks want it to be?

  • Kenneth LightnerK

    Some questions on the Relay Server service?

    Scheduled Pinned Locked Moved General relayservice multiplayer unity unet relay
    1
    0 Votes
    1 Posts
    151 Views
    No one has replied
  • T

    Stacktrace for Cloud Code errors?

    Scheduled Pinned Locked Moved Cloud Code cloud code script rhino cloud code
    6
    2 Votes
    6 Posts
    674 Views
    Paul WinterhalderP

    Well - the new release isn't out yet - it's just a Release Candidate.

    https://github.com/mozilla/rhino/releases

    That said - we are very happy to see the progress - since it has been over a year since 1.7.13 was released!

    Hopefully soon!

  • Login

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • Solved
  • Unsolved
  • Users