Function bug

Bugs will be moved here once resolved.

Post » Tue Aug 30, 2016 5:29 pm

Problem Description
Bug on function call

Attach a Capx
http://www.filedropper.com/bug_1 (on page press "Download this file")
http://www.filedropper.com/bug2 (on page press "Download this file")

Steps to Reproduce Bug
Execute capx

Observed Result
Error message

Affected Browsers
  • Chrome: YES
  • FireFox: not tested
  • Internet Explorer: not tested

Operating System and Service Pack
Win 8.1 64-bit

Construct 2 Version ID
233 64-bit
Last edited by andrew008 on Tue Aug 30, 2016 8:19 pm, edited 1 time in total.
B
3
Posts: 17
Reputation: 209

Post » Tue Aug 30, 2016 6:01 pm

1. That's a terrible file-sharing site.... just FYI.
2. You have not found a bug... You are not using the keyboard or function.call methods correctly.

See the manual pages that refer to these events and, if you're still stuck, I suggest you post a question in the "How do I" forum.
A big fan of JavaScript.
B
74
S
20
G
69
Posts: 2,205
Reputation: 43,832

Post » Tue Aug 30, 2016 8:18 pm

Colludium, try out this capx http://www.filedropper.com/bug2. Is this not a bug too?
B
3
Posts: 17
Reputation: 209

Post » Tue Aug 30, 2016 8:57 pm

Are you purposely not passing in the name, or are you missing the point that you aren't specifying the function name at all. It's not clear. You should be calling this:
Function.Call("Function",Variable1)
ImageImageImage
B
71
S
21
G
230
Posts: 3,688
Reputation: 128,852

Post » Tue Aug 30, 2016 9:04 pm

blackhornet wrote:Are you purposely not passing in the name, or are you missing the point that you aren't specifying the function name at all. It's not clear. You should be calling this:
Function.Call("Function",Variable1)


Oh yeah, that works. Thank you!
B
3
Posts: 17
Reputation: 209

Post » Wed Aug 31, 2016 1:01 pm

Yeah the real problem is you're circumventing the type check using a global variable to pass a number where you should pass a string.

Ideally C2 would reject this as an invalid expression but then changing the type of global variables could invalidate large numbers of expressions. That's not such a nice consequence. So closing as won't fix.
Scirra Founder
B
395
S
232
G
88
Posts: 24,368
Reputation: 193,746

Post » Wed Aug 31, 2016 5:43 pm

Ashley wrote:Yeah the real problem is you're circumventing the type check using a global variable to pass a number where you should pass a string.

Ideally C2 would reject this as an invalid expression but then changing the type of global variables could invalidate large numbers of expressions. That's not such a nice consequence. So closing as won't fix.


Thank you, Ashley!
B
3
Posts: 17
Reputation: 209


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 0 guests