Using *rand with numeric variables

Is there any way to use *rand with numeric variables? I’m pretty sure the answer to this is no since quicktest doesn’t like it, but I’d love to find out I’m just doing it wrong

Here’s what I wanted to do:

*create test_1 1
*create test_2 3
*create test 0

*rand test ${test_1} ${test_2}

I want →

*rand test ${test_1} ${test_2}

to function as →

*rand test 1 3

That however doesn’t happen. Instead I get “Invalid expression, couldn’t extract another token: {test_1} {test_2}”

Is there a way to make this work? Or do I need to just suck it up and add a bunch more *ifs when the upper and lower limits depend on character choices?

Thanks!

I am dumb and in fact doing it wrong

This →

*create test_1 1
*create test_2 3
*create test 0

*rand test test_1 test_2

works.

:upside_down_face:

May my dumb be a guide for future coders.

damn brackets

7 Likes

This topic was automatically closed 24 hours after the last reply. If you want to reopen your WiP, contact the moderators.