Stack for loop lists.

Help creating logic scripts for Air Manager Instruments

Moderators: russ, Ralph

Post Reply
Message
Author
User avatar
Keith Baxter
Posts: 4685
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Stack for loop lists.

#1 Post by Keith Baxter »

Hi,

My mind is a bit jumbled. I want to concatenate several for loops into one list to achieve this.

In other words pass the last "Y" value of the _txt() to the next loop. The ???? in the code ecample.
ice_screenshot_20201222-143359.png
ice_screenshot_20201222-143359.png (6.88 KiB) Viewed 1295 times

Code: Select all

	ti = #casW_list + #casC_list
	if casW_list ~= nil then 
		for i = 1, #casW_list do	
			_rect(225,115+(i*20),190,20)
			_fill("red")
			_txt(casW_list[i],robR_20yelL,230,125+(i*20))
		end
	end

	if casC_list ~= nil then	
		for i = 1, #casC_list do	
			_txt(casC_list[i],robR_20yelL,230,????+(i*20))
		end
	end	




Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

User avatar
Sling
Posts: 5242
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: Stack for loop lists.

#2 Post by Sling »

Keith,

The ??? Is simply 125 + (#casW_list*20)

User avatar
Keith Baxter
Posts: 4685
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: Stack for loop lists.

#3 Post by Keith Baxter »

Sling wrote: Tue Dec 22, 2020 1:19 pm Keith,

The ??? Is simply 125 + (#casW_list*20)
Tony,

Facepalm . Thank you. My brain is clogged with so much garbage.

Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

Post Reply