Problem with Labels and Common Events

I have a certain problem


If I do something like this
229177c620.png



I have the Label: Again with the Common Event Battle Processing having the Jump to Label: Again


The common event won't see the Label: Again so it will skip the whole jump.


Common events should detect the label in the event the CE is in.
you can make a variable instead.


in the Common Event Battle Processing, set x variable to 1.


--------------------------------------------------------------------------------


after 'Common Event : Battle Processing' command,


make a conditional branches, check if variable x is 1 then make a jump to 'Again'.


Btw, you can use switch instead.
No, they can't jump to labels outside the common event - that would go against so many rules for good programming that's not funny to count, and enabling such a sequence would make your bughunting really difficult as well as risking stack overflow errors.


And if you're planning such a thing, then it's usually an indication that you made a logical mistake somewhere - theoretically the solution of izyees will work, but I rather suggest that you check the logic inside your common events, because something is off there. Post them as screenshots if you don't know how to improve them.
you can make a variable instead.


in the Common Event Battle Processing, set x variable to 1.


--------------------------------------------------------------------------------


after 'Common Event : Battle Processing' command,


make a conditional branches, check if variable x is 1 then make a jump to 'Again'.


Btw, you can use switch instead.

Great idea, I'll see if the logic could work with that.


Andar, your logic is flawed. But you know that already I suppose.


Everything's perfect now, thanks again for the help, izyees.


The solution was so simple I couldn't even find it myself 🙂 .
Andar, your logic is flawed. But you know that already I suppose.

No, it's not


Any call to a subroutine will require the calling routine to be stacked. Jumping to a label in the calling routine is not only difficult to program and localize, it would also prevent the recall from the stack, creating a recursive memory leak until the stack overflows. Believe me, programming is something I really learned, even if I don't know every language and system - and the principles on how stacks work are always the same.

Original thread: https://forums.rpgmakerweb.com/threads/problem-with-labels-and-common-events.57431/