• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Options for Looping a Profile

    Discussion in 'Wildbuddy Developers' started by themarketguy, Nov 6, 2015.

    1. themarketguy

      themarketguy New Member

      Joined:
      Jun 24, 2015
      Messages:
      117
      Likes Received:
      0
      Trophy Points:
      0
      Good morning,

      I'm presented with a need to loop a profile without enclosing it within a while statement (<While Condition="1 == 1"> or something similar). Why you may ask? It appears that avoid tags may only be initialized at the root profile tag level in the XML (<Profile><Avoid/><Other Tags></Other Tags><Avoid Remove="true"/></Profile>), which means if you try to put an avoid tag within a while loop or an if statement they are ignored, or maybe not ignored but handled in a way that doesn't initialize them at least. The profile I'm working on spans many different zones, and in an attempt to incorporate best practices I want to initialize the avoidance for the given zone and clean it up when leaving the same zone.

      Currently the way the profile is built it is wrapped in a while loop that keeps it circling through from start to finish with if statements throughout that handle zone transfers and the to-dos. As such, in order to initialize the avoidance it would need to be at the beginning and couldn't be cleaned up.

      Any thoughts, ideas, or solutions would be greatly appreciated.
       
    2. theodds

      theodds Member

      Joined:
      Nov 2, 2015
      Messages:
      50
      Likes Received:
      0
      Trophy Points:
      6
      Hey How would you loop a profile anyhow? looking around but not sure what to do to make the profile repeat itself after it is done instead of ending.
       
    3. Deathdisguise

      Deathdisguise Community Developer

      Joined:
      Mar 7, 2015
      Messages:
      678
      Likes Received:
      6
      Trophy Points:
      0
      wrap the thing in a While tag!

      HTML:
      <While Condition="1 == 1">
          <!-- Your stuff here. -->
      </While>
      
       
    4. theodds

      theodds Member

      Joined:
      Nov 2, 2015
      Messages:
      50
      Likes Received:
      0
      Trophy Points:
      6
      Hey DD do you mean specifically

      <While Condition="1 == 1">
      < ------ >
      </While>

      ? cause whenever I try that or try something else to condition it it tells me I have only have 1 argument and need 2 for the While tag. What can I condition it on so that it repeats itself?
       
    5. themarketguy

      themarketguy New Member

      Joined:
      Jun 24, 2015
      Messages:
      117
      Likes Received:
      0
      Trophy Points:
      0

      definitely 1 == 1 will loop indefinitely without any other conditions
       

    Share This Page