jfrazierjr wrote:Ugh... I am having trouble getting my syntax right inside my loop. What i want to is to build a CHECK string from a list.
In case you're still fighting with it, I apparently had exactly the same idea, and doped out how to do this exact thing this morning. My code looks like:
Code: Select all
[h:expList="orc 1, orc 2, orc 3, orc 4, orc leader"]
[h:outputString=""]
[h,FOREACH(enemy,expList):outputString=outputString+" 'target"+roll.count+"|0|"+enemy+"|CHECK" + " ' " + ","]
[h:inputString=eval("input("+outPutString+" ' " + "def|AC|defense" + " ' "+ ")")]
[h:status=inputString]
[h:abort(status)]
[h:numEntries=listCount(expList)-1]
Number of items in list: [numEntries]<br>
[h:targList=""]
[h,FOR(i,0,numEntries):targList = if(eval("target"+i), listAppend(targList,listGet(expList,i)),targList)]