Exit/halt/return block in procedures?

Started by friyes on

Topic category: Help with MCreator software

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Exit/halt/return block in procedures?
Thu, 10/10/2024 - 22:08 (edited)

I just wanna make sure I'm not missing something, is there no return; block?

Like, in this procedure I'd like to make a guard clause so I don't end up with 6 layers of nesting;

Is this the correct usage of these blocks? Would this result in unexpected behavior if the trigger actually uses the return values!?

 

For now I will just be doing this;

But it'd be nice to know if there is an actual intended method for returning early using the currently available blocks...

Edited by friyes on Thu, 10/10/2024 - 22:08
Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
there still is a return…
Tue, 10/08/2024 - 17:18

there still is a return block its just impossible to find if you click the Flow control tab you grab the Return Logic block and there you go! 

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Doubt that works,
Tue, 10/08/2024 - 19:12

Doubt that works,

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Nope I just tested it, it…
Tue, 10/08/2024 - 19:14

Nope I just tested it, it just skips it like it says

Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
But it'd be nice to know if…
Thu, 10/31/2024 - 07:25

But it'd be nice to know if there is an actual intended method for returning early using the currently available blocks...


Well, to me seems like you've done just that. It stops further code if client sided.

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yeah, and after making this…
Thu, 10/31/2024 - 13:50

Yeah, and after making this post that's also just what I've been doing.
But a dedicated halt or end block would be nice.