wtf why isn't this working

Posted by NeutralReiddHotel on June 7, 2015, 12:36 a.m.

since i don't frequent the GMC anymore or yoyogames i'd figure i ask here

why this no work

   if (heal_step=0) {
      heal_number=-1;
      i=0;
      for (i=0;i>=6;i+=1) {
         if (slot[i+1,0]!=0) { // meaning in slot i, is there a species sitting there?
            heal_number+=1;
         } else { // if there isn't, end the loop
            i=6;
         }
         show_message("hey look at me i work");
      }
      heal_monitor=0;
      heal_ball_number=0;
      draw_heal_animation=true;
      heal_counter=30;
      show_message(string(heal_number));
   }

in specific, this part:

      for (i=0;i>=6;i+=1) {
         if (slot[i+1,0]!=0) { // meaning in slot i, is there a species sitting there?
            heal_number+=1;
         } else { // if there isn't, end the loop
            i=6;
         }
         show_message("hey look at me i work");
      }

running this gives me nothing. i fear i simply don't know how to run for statements, but I did one in another part of my game recently, and i have no idea why this doesn't work.

here's the video running:

so like, the video shows that the show_message("hey look at me i work"); part never runs, but the show_message(string(heal_number)); does. my goal is to make the heal_number equal the number of pokemon in my party, in this case, 2.

slot[0,0] is slot 0, and species id. slot 0 holds nothing

slot[1,0] holds charmander

slot[2,0] holds ghost.

what do i do now? i'm confused and i've spent weeks breaking my head with one line of code and i'm trying to avoid it this time if i can, because something tells me this is a SUPER simple fix im simply not seeing at the moment.

without this, healing a pokemon in my game will forever look retarded :(

Comments

Toast 9 years, 6 months ago

I resisted the temptation to be pedantic about coding style,so I was pedantic about something completely irrelevant instead.

Coding style I really don't care much about anyway, I blame the language for giving you the option of using bad style. Python has been growing on me for this reason, I like the way they do things