Raised This Month: $51 Target: $400
 12% 

Check "^"


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fmfs10
Senior Member
Join Date: Mar 2009
Location: Brasil
Old 03-28-2011 , 12:26   Check "^"
Reply With Quote #1

Hello! I'm using Admin SQL and I have a problem... I can't have any admin with ^ because it bugs the other ones after them. So all I want to know, is how to check the ^ for don't bug my admins anymore.
fmfs10 is offline
lis_16
Senior Member
Join Date: Feb 2008
Old 03-28-2011 , 14:44   Re: Check "^"
Reply With Quote #2

Before save them into sql replace all "^" with "". When you check if player is an admin, use
PHP Code:
if(contain(player_namename_from_sqlite)!=-1
lis_16 is offline
fmfs10
Senior Member
Join Date: Mar 2009
Location: Brasil
Old 03-28-2011 , 16:25   Re: Check "^"
Reply With Quote #3

And how can I replace it?
fmfs10 is offline
lis_16
Senior Member
Join Date: Feb 2008
Old 03-28-2011 , 16:48   Re: Check "^"
Reply With Quote #4

http://www.amxmodx.org/funcwiki.php?go=func&id=890
lis_16 is offline
fmfs10
Senior Member
Join Date: Mar 2009
Location: Brasil
Old 03-28-2011 , 18:32   Re: Check "^"
Reply With Quote #5

Just to check I tried it:
PHP Code:
if(contain(AuthData"^")!=-1
But not working... :/
fmfs10 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 03-28-2011 , 18:39   Re: Check "^"
Reply With Quote #6

You need to escape the escape character.

"^^"
__________________
fysiks is offline
fmfs10
Senior Member
Join Date: Mar 2009
Location: Brasil
Old 03-28-2011 , 18:59   Re: Check "^"
Reply With Quote #7

Oh in fact it worked... Thanks

But just to know, why in the AMXX STUDIO the ")!=-1) is still highlighted if I'm using ^^ ?
fmfs10 is offline
Elusive138
Senior Member
Join Date: Dec 2010
Old 03-29-2011 , 04:47   Re: Check "^"
Reply With Quote #8

Quote:
Originally Posted by fmfs10 View Post
Oh in fact it worked... Thanks

But just to know, why in the AMXX STUDIO the ")!=-1) is still highlighted if I'm using ^^ ?
The AMXX Studio syntax highlighter's a bit picky about escape characters - it probably doesn't realise the second ^ is actually escaped.

The compiler still works fine, so it's nothing to worry about.

An interesting bit of trivia: even if you don't change the escape character (i.e. keep it as '^'), Studio will still recognise '\' as one, and mess up the highlighting.
Elusive138 is offline
Seta00
The Seta00 user has crashed.
Join Date: Jan 2010
Location: Berlin
Old 03-29-2011 , 11:05   Re: Check "^"
Reply With Quote #9

Quote:
Originally Posted by Elusive138 View Post
An interesting bit of trivia: even if you don't change the escape character (i.e. keep it as '^'), Studio will still recognise '\' as one, and mess up the highlighting.
Hey, even Pawn Studio agrees you should always use '\' as the escape character.
Seta00 is offline
fmfs10
Senior Member
Join Date: Mar 2009
Location: Brasil
Old 03-29-2011 , 19:44   Re: Check "^"
Reply With Quote #10

Oh thanks

Hm, but I think it should be fixed in another release because in fact I've tried "^^" before but as I saw it was hilighted, I thought "Oh it's highlighted, so it shouldn't work :/"
fmfs10 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 03:14.


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