Call a variable from another variable
Okay - sorry for the ask, but this is a total noob questions. I can do this in a dozen other languages but cannot figure this out in Ren'py. I want to do a while loop. Every day, new persistent items open and have functions for each day (pictures, updates to bios, etc.). I have one for each day called "Per_Unlock_DayX" where X is the day it is. Basically I just want to have a simple while loop to unlock everything that happened before (and today) if someone jumps around. Here is my code, but cannot get it to work properly. I know it is simple to do, but just cannot figure out the syntax.
X is 1 to start. If the day_number is more than the current day, call the if statement. The if statement is just asking if it has already been unlocked. If not, increment the X. The variables are called persistent.DayXX_Unlock and the labels are Per_Unlock_DayXX
$ X = 1
while X <= Day_Number:
if not persistent.Day"[X]"_Unlock:
call Per_Unlock_Day"[X]"
$ X += 1
Any help would be appreciated.