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
Observed Result
Assertion failure: Calling expvalue.set_float without number type
Stack trace:
assert2@http://localhost:50000/preview_prelude.js:16:4
ExpValue.prototype.set_float@http://localhost:50000/expressions.js:788:3
SysExps.prototype.max@http://localhost:50000/system.js:2054:3
ExpNode.prototype.eval_system_exp@http://localhost:50000/expressions.js:255:3
Parameter.prototype.get_exp@http://localhost:50000/eveng.js:2049:3
Action.prototype.run_system@http://localhost:50000/eveng.js:1741:4
EventBlock.prototype.run_actions_and_subevents@http://localhost:50000/eveng.js:929:1
EventBlock.prototype.run@http://localhost:50000/eveng.js:886:4
Runtime.prototype.executeSingleTrigger@http://localhost:50000/preview.js:4175:5
Runtime.prototype.triggerOnSheetForTypeName@http://localhost:50000/preview.js:4094:4
Runtime.prototype.triggerOnSheet@http://localhost:50000/preview.js:4021:4
Runtime.prototype.trigger@http://localhost:50000/preview.js:4003:3
Layout.prototype.startRunning@http://localhost:50000/layout.js:365:3
Runtime.prototype.go_loading_finished@http://localhost:50000/preview.js:1624:4
Runtime.prototype.go@http://localhost:50000/preview.js:1479:4
Runtime@http://localhost:50000/preview.js:524:3
cr.createRuntime@http://localhost:50000/preview.js:5247:3
—://localhost:50000/:93:3
x.Callbacks/l@http://localhost:50000/jquery-2.0.0.min.js:3:24576
x.Callbacks/c.fireWith@http://localhost:50000/jquery-2.0.0.min.js:3:25388
.ready@http://localhost:50000/jquery-2.0.0.min.js:3:2822
S@http://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