1

I was just messing around writing a slot machine program on my PlusCE and I tried to run this:

:randInt(111,999,1)->A

But it won't save to the variable

Any ideas?

Jed Ester
  • 11
  • 1
  • 1
    Drop the third parameter. Three-parameter `randInt` returns a list, which cannot be stored to `A`. Since you only want one result, the two-parameter version should do just fine. [See this](http://tibasicdev.wikidot.com/randint) – Khuldraeseth na'Barya Mar 09 '20 at 15:12

1 Answers1

1

randInt returns a list, even if you only want one trial. So you need to store the result in a list variable.

Rgizz
  • 11
  • 1