'~' inside string variable possible?

BlitzMax Forums/BlitzMax Beginners Area/'~' inside string variable possible?

Grisu(Posted 2010) [#1]
Hi!

For a simple update program, I need to pass the file url via a string variable:

Url:string="http://188.165.211.46/~knot/prp/prp_win32.zip"

^BMX seems to has issues with the "~" inside the path.
Error message: Bad escape sequence in string?

Is there a fix for this?

Grisu


Oddball(Posted 2010) [#2]
I think you need to do a double tilde to get a single tilde in your string literal. Can't check it at the moment but I believe that's correct.
Url:string="http://188.165.211.46/~~knot/prp/prp_win32.zip"



Grisu(Posted 2010) [#3]
That's quite simple and works. Thanks!


GfK(Posted 2010) [#4]
Yep - this is documented under Language Reference>>Literals.