Bug?

This forum is currently in read-only mode.
From the Asset Store
Match same tiles with each other as fast as you can and earn more score during a limited time!
  • Everything was okey till i instaled Resource Access Plugin. then when i start to run my game it goes:

    <img src="http://img337.imageshack.us/img337/5480/fuuuuuq.png">

    nevermind

    aparently this is what was cousing the problem

    <img src="http://dl.dropbox.com/u/15566547/Untitled.png">

    any idea why?

  • You have two conditions on 6. Else means run if the tied condition is not met, so another condition saying not to run causes the error.

  • You have two conditions on 6. Else means run if the tied condition is not met, so another condition saying not to run causes the error.

    Not necessarily, no. Something like this works fine:

    + n equals 6
    
    + else
       n equals 5
    
    + else
       n equals 4
    
    + else[/code:2uqm8xa8]
    
    But there is another possible problem. Are you trying to modulo divide by 0? That's not possible (although I expected Construct to catch such error)
  • does this help?

    <img src="http://dl.dropbox.com/u/15587147/answer1.bmp">

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • actualy i was just an idiot and though that if i write % mark it would (just as using your calculator) divide. forgoten this obvious fact that 10% are in fact 0.10, and to get 10% of something i need it be multiply by 0.10.

  • does this help?

    <img src="http://dl.dropbox.com/u/15587147/answer1.bmp">

    Just as Tulamide pointed out that a sub condition if fine with used with Else, Trigger once is best used as a sub condition. Since it has no condition to compare it will probably run every time, which is something you want here, but for logic's sake an Always would make more sense.

  • actualy i was just an idiot and though that if i write % mark it would (just as using your calculator) divide. forgoten this obvious fact that 10% are in fact 0.10, and to get 10% of something i need it be multiply by 0.10.

    Don't be too harsh to yourself. It's just learning by doing, we all come to such points from time to time

    * off-topic *

    And here a description of the modulo operation:

      The percentage sign, when used outside of a string, is an operator, just like +, -, *, /, etc. And it does divide, but a modulo division, aka 'mod', giving the integer remainder of the division:
        13 % 5 = 3 -> can also be expressed by: 13 - floor(13 / 5) * 5 -> you can also do ((13 / 5) - floor(13 / 5)) * 5 -> it is just returning the decimal places of the division multiplied by the denominator
          13 / 5 = 2.6; 0.6 * 5 = 3
      Modulo is often used in programming to get a repeating list of ordered numbers. For example, the timer returns the milliseconds passed since start of the application. You want a sprite to constantly fade in and out repeatedly and every fade should last 1 second. But the sprite's opacity is expressed by a value ranging from 0 to 100. So what we need is converting the timer value in a way that we get a value repeatedly growing and shrinking between 0 and 100.
      • There are 1000 milliseconds in one second, but we need one second to be 100.
      • If doing 'timer % 100', the results returned will raise from 0 to 99, then immediatly fall back to 0 and raise again. [0, 1, 2, ..., 98, 99, 0, 1, 2, ...]
      The first issue is solved by floor-dividing timer by 10. The second issue is solved with two other tricks. First, we set the denominator to 201. This way the values returned will range from 0 to 200. Second, we make use of 'abs', which returns the absolute value of a number regardless of its sign (-4 and 4 both have the absolute value 4) The final expression now is: opacity = abs(100 - floor(Timer / 10) % 201) The returned values will be [100, 99, 98, ..., 2, 1, 0, 1, 2, ..., 98, 99, 100, 99, 98, ...] and every range 0-100 or 100-0 will last 1 second

    I just thought I explain it for those who are curious beginners. If it is inappropiate, I apologize.

  • * off-topic *

    And here a description of the modulo operation:

      The percentage sign, when used outside of a string, is an operator, just like +, -, *, /, etc. And it does divide, but a modulo division, aka 'mod', giving the integer remainder of the division:
        13 % 5 = 3 -> can also be expressed by: 13 - floor(13 / 5) * 5 -> you can also do ((13 / 5) - floor(13 / 5)) * 5 -> it is just returning the decimal places of the division multiplied by the denominator
          13 / 5 = 2.6; 0.6 * 5 = 3
      Modulo is often used in programming to get a repeating list of ordered numbers. For example, the timer returns the milliseconds passed since start of the application. You want a sprite to constantly fade in and out repeatedly and every fade should last 1 second. But the sprite's opacity is expressed by a value ranging from 0 to 100. So what we need is converting the timer value in a way that we get a value repeatedly growing and shrinking between 0 and 100.
      • There are 1000 milliseconds in one second, but we need one second to be 100.
      • If doing 'timer % 100', the results returned will raise from 0 to 99, then immediatly fall back to 0 and raise again. [0, 1, 2, ..., 98, 99, 0, 1, 2, ...]
      The first issue is solved by floor-dividing timer by 10. The second issue is solved with two other tricks. First, we set the denominator to 201. This way the values returned will range from 0 to 200. Second, we make use of 'abs', which returns the absolute value of a number regardless of its sign (-4 and 4 both have the absolute value 4) The final expression now is: opacity = abs(100 - floor(Timer / 10) % 201) The returned values will be [100, 99, 98, ..., 2, 1, 0, 1, 2, ..., 98, 99, 100, 99, 98, ...] and every range 0-100 or 100-0 will last 1 second

    I just thought I explain it for those who are curious beginners. If it is inappropiate, I apologize.

    <img src="http://goteaminternet.com/img/docs/65991.jpg">

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