AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Quote a quote? (https://forums.alliedmods.net/showthread.php?t=242966)

georgik57 06-27-2014 13:40

Quote a quote?
 
Is it possible to use a single " in a string? If it is, then how?

For example: "Please use quotation marks(") when reporting a player."

ddhoward 06-27-2014 13:42

Re: Quote a quote?
 
Try putting ^ before the quote mark?

"Please use quotation marks (^") when reporting a player."

https://forums.alliedmods.net/showthread.php?t=79817

georgik57 06-27-2014 13:44

Re: Quote a quote?
 
I knew double ^"^" work but wasn't sure for only 1. Thank you.

fysiks 06-27-2014 15:56

Re: Quote a quote?
 
Quote:

Originally Posted by georgik57 (Post 2158275)
I knew double ^"^" work but wasn't sure for only 1. Thank you.

The ^ character is called the escape character. It tells the compiler to interpret the character that follows it as a literal character and not as a programming character.

ddhoward 06-27-2014 16:04

Re: Quote a quote?
 
Quote:

Originally Posted by fysiks (Post 2158342)
The ^ character is called the escape character. It tells the compiler to interpret the character that follows it as a literal character and not as a programming character.

To those who got here through the search function:

The ^ is the default escape character for AMX Mod X. In Sourcemod, the \ key is what you want.

georgik57 06-27-2014 16:16

Re: Quote a quote?
 
Thank you both. Appreciate it.


All times are GMT -4. The time now is 21:15.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.