Stencyl 3.4.0 is now out. Get it now!

Bug Issue: HTML5: returning null from custom blocks does Bad Things

Pages: 1


  • Junior Stencyler
March 11, 2017, 12:45:37 am
Version: Stencyl build 9300 from 2017-02-14

How to repro: create a custom block that returns an Actor (e.g. "Find Actor In Group"), and return null from it. Assign the return of that custom block to an Actor type attribute.

What happens: in some cases, the calling function will silently abort. In others (probably where a catch() is used), it will complain that it basically cannot cast null to Actor (other types are likely affected too, I haven't tried).

Workaround: Instead of assigning the custom block return value to an Actor type attribute and checking if it has value, I created another custom block ("Actor Exists In Group") which duplicates the functionality of the first block, but returns true (some Actor was found) or false (no Actor found, the first block will return null if called). Then, only call the first custom block if the second one returns true.

(This only breaks in HTML5, other platforms have no problem with assigning null to an attribute)
« Last Edit: March 11, 2017, 12:48:41 am by SirAthos »

Pages: 1


  • Reported
    March 11, 2017, 12:45:37 am
  • Updated
    March 11, 2017, 12:45:37 am

  • View Status
  • Type
  • Status
  • Priority
  • Version
    Stencyl 3.4
  • Fixed in
  • Assigned to
  • Category