@CJW @loelet Sorry, I’m not sure what that means. What is a “string”? I’ve never coded anything other than CS stuff before, and it doesn’t actually tell what things are, just how to use them. What issues could possibly come from that? I’ve never had anything wrong specifically from defining my variables like that.
A string is a data type used in programming, such as an integer and floating point unit, but is used to represent text rather than numbers. It is comprised of a set of characters that can also contain spaces and numbers. For example, the word “hamburger” and the phrase “I ate 3 hamburgers” are both strings. Even “12345” could be considered a string, if specified correctly. Typically, programmers must enclose strings in quotation marks for the data to recognized as a string and not a number or variable name.
@lordirishdas So all I have to do is remove the quotation marks around it? And thanks for the information! I have tried to look things like that up on the internet, but all the definitions I could find were all too complicated for me to understand! Thanks for dumbing it down to a level someone with no experience can understand!
I am on the same level lol, but doing alot of reading to get smarter at it. And yes just remove " ".
Thanks! I am perfectly capable of being smart at anything I’ve ever encountered… except for computers, lol! I don’t know why, but all the different terms and stuff just haven’t clicked for me yet!
It has been a challenge to say the least but making headway. And no problem glad I could help.
@Galador
A string is a sequence of symbols… like a word.
If I write 123456 that means I have a number. That number between 123455 and 123457. I can add +7 and get 123463 and everything, else I can do with a number.
If I write “123456” that means the string of the symbols 1, 2, 3, 4, 5, 6 in that order. I could use the &-command to add “123456” & “789” to “123456789”.
If you want to define a phone number and later add a prefix because you call from another number, you should save it as a string - if it is used as a number for calculations you should define it as a number by not writing ""s.
I don’t even know if “3”+“4” would be possible. It’s like “apple” + “pear”.
“3” + “4” = “34” usually.
@loelet Thanks! That makes it even clearer to me! I’m not sure that there is anything wrong with the game though, as far as it goes. I click an option and then go to the stat chart and when I have something that adds, say, +7, on the stat chart, the stat now displays a 7. When I go back and add/subtract another value, it still works as intended. I think as long as I leave out the quotation marks in the actual game, it works as it is intended to since even if it is a string, I am simply adding another digit with a zero in front (like 07 rather than 7) and then the digits following the zero (the seven) are what are being modified by the further commands. I can see where this will be a problem for a variable that is not starting out as a zero, however.
Feel free to tell me if I am horribly wrong with my assessment! In fact, if I am, please do tell me!
Everything that needs to be said has been, but a little extra fluff - if you’re interested:
ChoiceScript is interpreted, the code that is actually being executed by the browser, is javascript (if you’ve heard of that).
Now in Javascript if you make a variable and set it to the following:
var num = “5” + “5”;
The value of ‘num’, should you output it, will be 55, not 10.
This is because anything enclosed within quotation marks is considered a string (regardless of the contents), which is text-only data. You can’t perform mathematical operations on strings, for obvious reasons, so the addition operator concatenates (or combines) them instead.
However, if we were to write:
var num = 5 + 5;
Without the quotation marks; outputting the variable num would give us ‘10’.
As Javascript identifies both bits of data as numbers.
tl;dr
Choicescript is coded to be forgiving in this regard and convert strings containing only numerical characters into numbers, thus it appears to allow mathematical operations on strings - but really it’s just catching your errors.
This isn’t normal behaviour, so whilst it works, it’s a bad habit to pick up. You should - as you’ve realized - only use quotation marks for defining text values.
If you need to see it in action to understand, you can try putting each of these code snippets (in turn):
*temp number
*set number "five" + "four"
${number}
*temp number
*set number "4" + "5"
${number}
*temp number
*set number "4" + "five"
${number}
*temp number
*set number "4" + 4
${number}
Onto this page: https://dl.dropbox.com/u/7840892/CJW/choicescript/tools/online-cs-tester/mygame/input.html
That should make it quite clear! 
@Galador if ChoiceScript keeps bugging out, make sure you unblock the zip file when you extract it. That happened to me once, and I got a ton of errors with nothing else wrong.
@Redgrave I had that problem a little while ago, lol. Thanks for the response, though! It took quite a while for someone with a version of windows as old as mine to see my thread and know what needed to be done!
@CJW Thanks so much for all the extra information! I think I now completely understand what a string is! It only took a few well-versed people to explain to me, too, so that is good! Lol!
Thanks to everyone else who had input as well! I really appreciate everyone here!
