Skip to content

How can I cycle messages in a nested while loop? #971

Answered by ptheywood
LewisHancock asked this question in Q&A
Discussion options

You must be logged in to vote

Within FLAME GPU 1, message list iteration is subject to a number of restrictions:

  • All threads must participate in the iteration (i.e. get_next_X_message must be called the same number of times by all threads (and strictly speaking without branching between the calls)).
  • Message lists can only be iterated once (I believe, though multi-iteration may work for some message types).

Effectivley this means that you cannot have a while(message) loop within any other branching statement (while, or if), and it is just a limitation of FLAME GPU 1.


For your intended behaviour of building the network of agent connections there might be a few options to achieve this in FLAME GPU 1, but exactly how d…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@LewisHancock
Comment options

Comment options

You must be logged in to vote
1 reply
@LewisHancock
Comment options

Answer selected by LewisHancock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
FLAMEGPU 1 Offtopic (FLAMEGPU 1)
3 participants