Jump to content
Sign in to follow this  
d0n

naming variables in a loop

Recommended Posts

d0n

i have something like this i want to be able to name $BossMod_Checkbox1, $BossMod_Checkbox2, $BossMod_Checkbox3 and so on in the loop, how do i do it?

For $a = 1 to $Skill[0][0]
    $BossMod_Checkbox = GUICtrlCreateCheckbox($Skill[$a][0], 230, 70+$a*20)
Next

thanks for help

Share this post


Link to post
Share on other sites
qazwsx

Use an array?

Share this post


Link to post
Share on other sites
Genos

Yes, making $BossMod_Checkbox into an array should accomplish what you're wanting.

Share this post


Link to post
Share on other sites
d0n

so inside the array have the variables named already? what if i dont know how many i need to name?

EDIT: nvm i got it to work thx

Edited by d0n

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×