Repeat loop can't remove name

All topics about ZGameEditor goes here.

Moderator: Moderators

Post Reply
User avatar
Posts: 383
Joined: Sat Feb 15, 2014 9:54 am

Repeat loop can't remove name

Post by rrTea » Tue Jun 11, 2019 2:24 am

I have a Repeat component that I named in order to use it in a specific way. But now I put the code in the While expression so I don't need to have a named component anymore. But I can't remove the name, I'm confused :D

剪貼簿圖片 (26).png
Try to remove the name from the Repeat component and you will get a message that it is being used.
剪貼簿圖片 (26).png (1.72 KiB) Viewed 2235 times

Code: Select all

<?xml version="1.0" encoding="iso-8859-1" ?>
<ZApplication Name="App" Caption="ZGameEditor application" FileVersion="2">
    <Repeat Name="loop_Cling">
<![CDATA[//this.Iteration=current iteration nr. Return false to end loop.

int i;//
i = this.Iteration;]]>
Edit: a bit of magic solves the problem! If I go to the While expression, ctrl-x all the code, remove the name and then ctrl-v back the same code the component remains nameless. Yupi!
Last edited by rrTea on Tue Jun 11, 2019 8:44 am, edited 3 times in total.

User avatar
Site Admin
Posts: 2029
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden

Re: Repeat loop can't remove name

Post by VilleK » Tue Jun 11, 2019 8:24 am

Ok good you found a solution :). I guess the "this.Iteration" part refers internally to the component so ZGE gets confused.

Post Reply