an Error Message in Debug Mode

For questions about using Classic.

Post » Thu Oct 22, 2009 4:39 pm

There is a sprite with 8-direction behavior.
When we press key 1 and then during the Box movement we press Space the box spawns only one circle.
When we press key 2 and then during the Box movement we press Space the box can spawn only two circles on the screen.

Question: why if I run the application in the Debug mode I get an error message?



test "cap" file: [url:23f9l76q]http://www.4shared.com/file/142739250/89158e49/create.html[/url:23f9l76q]
B
3
S
2
G
3
Posts: 146
Reputation: 1,567

Post » Thu Oct 22, 2009 5:41 pm

The debugger always does this when there are no instances of an object where the "Count" expression is used. It's normal behavior and doesn't cause any problems.
Moderator
B
98
S
37
G
19
Posts: 1,584
Reputation: 17,817

Post » Thu Oct 22, 2009 6:00 pm

linkman2004 Thanks!
Because this error message confuses me..
B
3
S
2
G
3
Posts: 146
Reputation: 1,567

Post » Thu Oct 22, 2009 7:28 pm

You can safely ignore that message for the Count expression - it's meant to return 0 when no objects exist (obviously), but the debugger warns you in case you're trying to get some other expression, like its position, when none exist, in which case it just returns 0.
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,554

Post » Thu Oct 22, 2009 7:31 pm

This is one of the most annoying errors in construct. Don't worry about it as they've said, it's normal behavior. Every time I start my game in debug mode I get like 20 of them one after an other. :(
B
25
S
3
G
6
Posts: 1,197
Reputation: 5,620

Post » Thu Oct 22, 2009 7:44 pm

Thank you guys for your answers
B
3
S
2
G
3
Posts: 146
Reputation: 1,567

Post » Thu Aug 05, 2010 11:43 am

Is it at all possible to suppress the Count error message? It's annoying as hell. It would be nice to have a toggle, because it's value is obvious *when* you need it to check for you.
B
2
G
2
Posts: 42
Reputation: 734


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests