AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   #pragma explanation (https://forums.alliedmods.net/showthread.php?t=106312)

Jack86 10-13-2009 17:41

#pragma explanation
 
I found these lines in a plugin im editing, what they do, how they affect compiling and can i remove them ?

PHP Code:

#pragma semicolon 1
#pragma ctrlchar '\' 


Arkshine 10-13-2009 17:46

Re: #pragma explanation
 
- It means you must finish each lines by a semicolon ';'. But by default it's not needed at all.
- It changes the control char. By default it's '^'.

You can safely remove the first.

Exolent[jNr] 10-13-2009 17:52

Re: #pragma explanation
 
I don't think you can safely remove the second one if the code in that plugin uses the ctrlchar as \

Arkshine 10-13-2009 17:56

Re: #pragma explanation
 
You're right, didn't try to think much -_-

zekStein 08-23-2013 13:40

Re: #pragma explanation
 
I cant escape like ^^ .. and if i change the control char with $ for example i get a lot of error at formatex html ..

Arkshine 08-23-2013 13:59

Re: #pragma explanation
 
Don't use $ then, but you can escape ^ using ^^. I've tested it.

seriousspot 08-23-2013 20:54

Re: #pragma explanation
 
from my code
PHP Code:

replace_all(escaped_stringcharsmax(escaped_string), "^"", "\^""



All times are GMT -4. The time now is 22:42.

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