I know you can use <<textinput $name>> to change the 'name' variable...
Is there something similar for numbers?
I have tried numberinput, intergerinput, arrayinput... I guess shooting in the dark can only work so often haha.
I know I can use radio buttons and the such to set this manually... but I am expecting this may need to go from 1 to 50 or so... or even more if someone wants to try and break the values haha
Comments
The <<textinput>> macro can be used to input Text, Number, or Date data types although you will need to convert the value entered into a number or date yourself.
The following example will ask the reader to enter their age, it will then do the following:
a. Check to make sure the reader actually entered a value.
b. Check that the String value entered is numerical using Javascript's isNaN() function.
c. Convert the String into an integer using Javascript's parseInt() function.
1. Start passage 2. Check Age passage notes:
a. Javascript has other functions/methods to convert String values into other data types.
b. HTML5 has more input types than just text and although it is possible to use these inputs in a Twine story you will need to use custom Javascript code to transfer the value entered into $variable storage.
Sorry about that. I check which thread it's in myself since the two are so different.
I read up on some java and (after seeing yours worked) I tried: and that seems to work too!
Looks like Java might be my next obstacle
Thanks for the NaN tip. I can try this to verify:
Thank you so much. Now I know I need to Java!
(I can't seem to mark your answer as having solved my problem :S)
To check/change which Story Format will be used when you test/build your story HTML file use the Story > Story Format menu options. The Story Format defines the default features and look of your story.
Sorry for that. I honestly thought the story format was something like a built-in programming language that only varied between V1 and V2
I'm using Sugarcane apparently (rotting my teeth, and my brain at the same time XD)
Thank you again. I apologise for my ignorance, I should have researched that a bit sooner