How do you get double quotes into strings in CRPL?
You can't....
Consider using a single quote instead for any messages you want to show.
Okay.
Never say "never."
"""" 1 1 Substring ->QUOTE
<-QUOTE "Hello World" <-QUOTE Concat Concat SetPopupText
TRUE SetPopupTextAlwaysVisible
I'm not sure what causes it, but there appears to be a bug where as long as a string contains ONLY double quotes, and ONLY and even number of them, they get through. Use Substring to chop it down to one, and sprinkle liberally.
I can't recommend actually using it though, as future patches to the game could "fix" the bug, and then your maps might break.
Holy **** that is cool.
Alternatively you could give the script an input variable and type in a double-quote in the editor. Though that may get tedious if it's on several cores.
Quote from: Grayzzur on April 02, 2015, 10:37:54 PM
Never say "never."
"""" 1 1 Substring ->QUOTE
<-QUOTE "Hello World" <-QUOTE Concat Concat SetPopupText
TRUE SetPopupTextAlwaysVisible
I'm not sure what causes it, but there appears to be a bug where as long as a string contains ONLY double quotes, and ONLY and even number of them, they get through. Use Substring to chop it down to one, and sprinkle liberally.
I can't recommend actually using it though, as future patches to the game could "fix" the bug, and then your maps might break.
Ha... that is interesting, I'd have thought that might be an empty string but thinking about how it gets parsed... yeah I guess so :)
"""" forms a single token. I got lucky because the parser looks to see if the token starts with a quote. If so, it looks at the end to make sure it ends with a quote. Then it takes what is in the middle as a string. I've not looked but there might be another check in the parser to look for an even number of quotes in a token as well.
The editor trick sounds interesting too.
This all goes to show that I'm officially not the best player, or even the best scripter :) (I usually lose that first title on the first day of Alpha testing)
Quote from: virgilw on April 03, 2015, 09:51:34 AM
This all goes to show that I'm officially not the best player, or even the best scripter :) (I usually lose that first title on the first day of Alpha testing)
Without you there'd be no competition at all, and for that we thank you!
I thought that was pretty neat, I made a little comment on the Wiki here (https://knucklecracker.com/wiki/doku.php?id=crpl:docs:concat) for this in case anyone else wonders. :)