• 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
W

william

@william
About
Posts
6
Topics
3
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

    ScheduleRunScriptUTCv2 doesn't seem to work as expected?
  • W william

    Hey @Paul-Winterhalder

    Tested and it works like a charm. Thanks again!


  • Are there plans to support Storekit 2 receipt verification?
  • W william

    Currently it appears that VerifyPurchase is only compatible with the StoreKit 1's PKCS#7 receipts. With StoreKit 2 becoming more common, the receipt format is apparently shifting to using the JWS representation for verification, and is recommended by libraries like Unity Purchasing v5. So I was curious if there are plans to update VerifyPurchase via either a secondary itunes store ID or a full migration?


  • ScheduleRunScriptUTCv2 doesn't seem to work as expected?
  • W william

    Any time - thanks for looking into it!


  • ScheduleRunScriptUTCv2 doesn't seem to work as expected?
  • W william

    In the API docs for ScheduleRunScriptUTCv2, the description for the scriptName parameter says:

    The name of the script with its absolute path to be run.

    https://docs.braincloudservers.com/api/capi/script/schedulerunscriptutcv2

    I've tried auto-rescheduling a script with bridge.getScriptName() given for the scriptName, which seemingly gives the correct full path, but when the scheduled job tries to run, it says it can't find the script:

    Screenshot 2025-09-08 at 10.46.45 AM.png

    Script not found: RefreshWeeklyChallengeCourse

    This is a snippet of the code used to schedule the new run job:

    /**
     * @returns {number} The next run date in UTC millis.
     */
    function setNextScheduledRun() {
      let scriptProxy = bridge.getScriptServiceProxy();
    
      const now = new Date();
    
      const nextRunDate = new Date(Date.UTC(
        now.getUTCFullYear(),
        now.getUTCMonth(),
        now.getUTCDate(),
        2
      ));
    
      setToNextDayOfWeek(nextRunDate, data.dayOfWeek);
    
    
      let scriptData = data;
      let scriptName = String(bridge.getScriptName());
      let nextRunMillis = nextRunDate.getTime();
    
      bridge.logInfo(`Next run: ${nextRunDate.toISOString()}`);
      bridge.logInfo(`Next run millis: ${nextRunMillis}`);
    
      if (!data.dryRun) {
        cancelExcessJobs(scriptProxy, scriptName, nextRunDate);
      }
      
      let scheduleResponse = scriptProxy.scheduleRunScriptUTCv2(scriptName, scriptData, nextRunMillis);
    
      if (scheduleResponse.status !== 200) {
        bridge.logErrorJson("Failed to schedule next script run", scheduleResponse);
        return 0;
      }
    
      return nextRunMillis;
    }
    

    When I've manually ran the script via the API Explorer, everything works correctly and a job is scheduled. Only once I've moved the script to the root folder does it find the script and work. While this gets the job done, the issue feels like either a bug in the API or a documentation issue that could use updating.

    If I'm misunderstanding something, please feel free to correct me, but I wanted to bring it up in the event that it is indeed a bug. Thank you in advance for your time.


  • Ability to save custom-entity query macros
  • W william

    Our team is experimenting with custom entities, saving replays of matches to be able to debug/observe gameplay. One friction point that I quickly found out though is the inability to streamline queries beyond copy/paste/editing query strings.

    It'd be great if there was a way to save/manage query presets directly in the portal, with an easy way to adjust them when we want to, say, search for matches on a specific course, hole number, and where players finished within a certain timeframe, without having to tediously edit them every time. Perhaps even a feature to be able to search by referencing custom indexes created for the entities, utilizing the increased speed and efficiency that they bring.

  • Login

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