-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Escape sequence \\ not working in v4.0.4-b1 #2614
Comments
Quick update: I just went back to 4.0.3 and it all works as expected, no errors at all. So definitely a bug in 4.0.4-b1. |
I actually don't think this should have been escaped with Regardless, thank you for letting me know about this issue. I pulled the Proposed change to
Proposed change to
|
Ah, for a moment I couldn't see a difference in your proposed code to that which I tried last night, then I noticed you've swapped over the single and double quotes. 😉 So now we can't escape a quote mark if it is the same type used to encapsulate that part of the speech. As I mentioned, it used to work in v4.0.3 and before, but not now in v4.0.4-b1. I'm sure others will fall foul of this change as I have, so would it be possible to add it in the change log, so that others can also be made aware, and update their scripts accordingly? |
I'm still not entirely satisfied with that part. Either alternating between single and double quotes should work or escaping (with a single backslash for the first level of escaping) should work. Mulling this over. |
Escaping a single level works just fine, e.g. |
It may share some similarities with #2607 in that we are trying to iteratively parse functions in ways that native Cottle functions do not support, e.g. |
@Tkael, Sorry to drag this one back, but I'm having trouble with the following code, I just can't get it to work no matter what I try with the quote marks or escape sequences. Any Ideas?
While this is line 34 in my code, EDDI keeps saying there is na error on line 2. If I remove this line entirely, then it all works as expected. |
Perhaps something like this?
|
Ahh, thank you for your solution. :-) It was only when I looked at this again after your answer, that I realised my mistake. I was missing a closing } after My code works perfectly when I add it. :-) Thanks for your answer anyway! :-) |
Noted change to escape character rendering. Resolves EDCD#2614.
Noted change to escape character rendering. Resolves EDCD#2614.
Noted change to escape character rendering. Resolves EDCD#2614.
What's Wrong (please be as specific as possible)
Expected
Escape sequence double slash ( \\ ) to work as normal.
Observed
EDDI reports error of unexpected \
There is a problem with this script at line 10. expected expression, found \
Steps to reproduce
Configuration
My Investigation
Investigation Notes
I was looking over the new 'Destination arrived' event script, and wanted to see about making some changes to the Anarchy pirate report at the end. I copied the default code out to a temporary script and made my changes, then tested it to see how they sounded, but I was greeted with the above error message.
I've traced it down to it being the double slash to escape the single quotes in the criminal/pirate OneOf() code. If I make them single slashes, the script runs, but doesn't speak the criminal/pirate line.
This is the code I copied out of the new default script:
I changed the Occassionally to 1 so that it would always activate, and clicking the test button produces the error. The syndicate, clan, gang, and Honorific function do not work.
I have that escape sequence in a couple of my other scripts, and they also fail now. In one, I use the sequence only once, and I now get this error when testing it:
There is a problem with this script at line 2. expected end of string, found incomplete expression.
However, the \ is actually on line 32. If I remove one slash, the script works, unless it tries to execute that particular line of code (it's in a OneOf() ).
This is that script if you wish to test it:
EDDI Logs
None, but can be provided if needed.
Player journals
N/A
The text was updated successfully, but these errors were encountered: