Thread Rating:
  • 8 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GUI_NewCheckbox in Loops?
#1
Hi All,
I have a question about GUI_NewCheckbox
if I have a loop, how can I check whether the checkbox is on or off?
The query is stored here in "JD"..k so JD1, JD2, etc.. Unfortunately, you can not define a variable, only a string.

but now I want to let the query run in a loop, since the number of checkboxes are dynamic.


here is an example

PHP Code:
...
for 
1,40 do
  
GUI_NewCheckbox("TestBox","John Do Nr."..k,"JD"..k,"Delete Name")        
end
... 


I tried it with an array, but it does not work Complaint

PHP Code:
...
local JDcheck = {}
for 
1,40 do
  
GUI_NewCheckbox("TestBox","John Do Nr."..k,JDcheck[k],"Delete Name")        
end
... 

thank you
MAHA
Reply
#2
if ( _G["JD"..k] == "1" ) then
...................................
Yeah, well. The Dude abides.
Reply
#3
ahh that's right _G[...]
thank you
Reply
 


Forum Jump:


Users browsing this thread: 5 Guest(s)

We help you win the game.

FFXIV Bot and More.

 

Products