0 Favourites

caught this error when I ran the following command (mark2)

  • Problem Description

    I know this ended up in the "CLOSED BUGS" section because there was no capx.. oh well.. it took me some time to get around to making the 1 line capx.. so please see attached.

    add key "timer" with value max(0,var_t)

    VAR_T is a text variable. I suspect there's a casting issue and this throws up an error when executed in the browser.

    Attach a Capx

    [attachment=0:2ekx4bdi][/attachment:2ekx4bdi]

    Description of Capx

    two global variables, one text, one number. one event (on start of layout) that runs and assigns the maximum value of the text variable and a number... crash.

    Steps to Reproduce Bug

    • just run the capx

    Observed Result

    Assertion failure: Calling expvalue.set_float without number type

    Stack trace:

    assert2http://localhost:50000/preview_prelude.js:16:4

    ExpValue.prototype.set_floathttp://localhost:50000/expressions.js:788:3

    SysExps.prototype.maxhttp://localhost:50000/system.js:2054:3

    ExpNode.prototype.eval_system_exphttp://localhost:50000/expressions.js:255:3

    Parameter.prototype.get_exphttp://localhost:50000/eveng.js:2049:3

    Action.prototype.run_systemhttp://localhost:50000/eveng.js:1741:4

    EventBlock.prototype.run_actions_and_subeventshttp://localhost:50000/eveng.js:929:1

    EventBlock.prototype.runhttp://localhost:50000/eveng.js:886:4

    Runtime.prototype.executeSingleTriggerhttp://localhost:50000/preview.js:4175:5

    Runtime.prototype.triggerOnSheetForTypeNamehttp://localhost:50000/preview.js:4094:4

    Runtime.prototype.triggerOnSheethttp://localhost:50000/preview.js:4021:4

    Runtime.prototype.triggerhttp://localhost:50000/preview.js:4003:3

    Layout.prototype.startRunninghttp://localhost:50000/layout.js:365:3

    Runtime.prototype.go_loading_finishedhttp://localhost:50000/preview.js:1624:4

    Runtime.prototype.gohttp://localhost:50000/preview.js:1479:4

    Runtimehttp://localhost:50000/preview.js:524:3

    cr.createRuntimehttp://localhost:50000/preview.js:5247:3

    http://localhost:50000/:93:3

    x.Callbacks/lhttp://localhost:50000/jquery-2.0.0.min.js:3:24576

    x.Callbacks/c.fireWithhttp://localhost:50000/jquery-2.0.0.min.js:3:25388

    .readyhttp://localhost:50000/jquery-2.0.0.min.js:3:2822

    Shttp://localhost:50000/jquery-2.0.0.min.js:3:466

    Expected Result

    not to crash

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (YES)
    • Internet Explorer: (YES)

    Operating System and Service Pack

    WIN8.1

    Construct 2 Version ID

    175 & 176

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • Thanks, fixed for next build. Note min and max only work with numbers, so the fix is that they will just ignore text values and treat them as 0.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)