Raised This Month: $ Target: $400
 0% 

#pragma explanation


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Jack86
Veteran Member
Join Date: Dec 2008
Location: Belgrade, Serbia
Old 10-13-2009 , 17:41   #pragma explanation
Reply With Quote #1

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 '\' 
__________________

Jack86 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-13-2009 , 17:46   Re: #pragma explanation
Reply With Quote #2

- 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.
__________________

Last edited by Arkshine; 10-13-2009 at 17:58.
Arkshine is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 10-13-2009 , 17:52   Re: #pragma explanation
Reply With Quote #3

I don't think you can safely remove the second one if the code in that plugin uses the ctrlchar as \
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-13-2009 , 17:56   Re: #pragma explanation
Reply With Quote #4

You're right, didn't try to think much -_-
__________________
Arkshine is offline
zekStein
Member
Join Date: Feb 2011
Location: Romania :(
Old 08-23-2013 , 13:40   Re: #pragma explanation
Reply With Quote #5

I cant escape like ^^ .. and if i change the control char with $ for example i get a lot of error at formatex html ..
__________________
DUMITRU
zekStein is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-23-2013 , 13:59   Re: #pragma explanation
Reply With Quote #6

Don't use $ then, but you can escape ^ using ^^. I've tested it.
__________________

Last edited by Arkshine; 08-23-2013 at 13:59.
Arkshine is offline
seriousspot
BANNED
Join Date: Mar 2013
Location: Lithuania / Norway
Old 08-23-2013 , 20:54   Re: #pragma explanation
Reply With Quote #7

from my code
PHP Code:
replace_all(escaped_stringcharsmax(escaped_string), "^"", "\^""
seriousspot is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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