Saying a random number in word form (I7) Quick question!


(Marshal Tenner Winter) #1

Hellos. I’m coding and I want to

say [a random number between 2 and 5]

but I want it to say “three” instead of “3” (for example). I looked in the documentation and must’ve missed it or something.

Thanks!

(ps - how do I quote code on this forum? I missed that, too.)


(Hanon Ondricek) #2

http://inform7.com/learn/man/WI_5_4.html
Don’t use the brackets unless it’s within quoted text.

When play begins:
	say a random number between 2 and 5 in words;
	say "[paragraph break]";
	say "Wow, I can count to [a random number between 1 and 6 in words]!"

Paste code, highlight it all, then use the </> symbol to make it code.


(Marshal Tenner Winter) #3

Thank you, Hanon!!!

(The extra exclamations were added to make the 20 character limit)


(Hanon Ondricek) #4

Whoops, I had fixed that before the migration and forgot to do it again. I’ll lower it.