I have no idea what "it's not doing anything" means. As far as I know, it could mean any of the following:
* the variable 'daycalc' doesn't get changed at all
* the variable 'daycalc' is changed, but is only changed to "Day:" because str() itself isn't working
* the variable 'daycalc' is changed, but the player doesn't know that because the screen doesn't show the new value of 'daycalc'
* the screen doesn't even appear anymore
In any case, the below code seems to function as intended; upon clicking on the textbutton, the text immediately changes from 'sandwich' to 'Day:15'. In other words, on Ren'Py 6.17.7.521, I can't replicate your issue. Are there any other functions (especially callbacks) that are changing 'daycalc' or 'curday'?
Code: Select all
screen why_now:
textbutton "wait" action SetVariable('daycalc', "Day:" + str(curday))
text "[daycalc]"
label start:
$ daycalc = "sandwich"
$ curday = 15
show screen why_now
"wait here"