Raised This Month: $ Target: $400
 0% 

pawn escape chars


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hyphen
Senior Member
Join Date: Aug 2011
Old 06-09-2012 , 02:01   pawn escape chars
Reply With Quote #1

I couldn't find pawn escape chars guide on web, if anyone have please upload.

How should I write to console or some where else this line..

MAP++;

; recognizes as bad char
hyphen is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-09-2012 , 02:18   Re: pawn escape chars
Reply With Quote #2

How do you know that it "recognizes as bad char"?

Show the code.
__________________
fysiks is offline
hyphen
Senior Member
Join Date: Aug 2011
Old 06-09-2012 , 02:22   Re: pawn escape chars
Reply With Quote #3

client_cmd(me, "echo MAP++;") - never got output MAP++;. Only get MAP++

; recognizes as bad char - written wrongly, it doesnt give the output properly

Last edited by hyphen; 06-09-2012 at 02:25.
hyphen is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-09-2012 , 02:35   Re: pawn escape chars
Reply With Quote #4

If you mean control character, in pawn by default it's '\'
In amxx, it's '^', because \ is already used a lot in HL, for exemple in menus.
You can change it to what you want, see page 119 : http://www.compuphase.com/pawn/Pawn_Language_Guide.pdf

If i've misunderstood, and if you want to execute more than 1 command in a player console for example, then you can use ';'
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 06-09-2012 at 02:35.
ConnorMcLeod is offline
hyphen
Senior Member
Join Date: Aug 2011
Old 06-09-2012 , 02:41   Re: pawn escape chars
Reply With Quote #5

No, I dnt wanna exec multiple commands on clients, that was just a quick example.

I would like to print MAP++; to console.

And ty for the link but I already checked this, was trying to find specific escape chars only for amxx

Last edited by hyphen; 06-09-2012 at 02:42.
hyphen is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-09-2012 , 03:27   Re: pawn escape chars
Reply With Quote #6

You have to put quotes around it. The console recognizes ; as a command separator.

Code:
client_cmd(id, "echo ^"MAP++;^"");
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
hyphen
Senior Member
Join Date: Aug 2011
Old 06-09-2012 , 04:16   Re: pawn escape chars
Reply With Quote #7

^^ Done
hyphen 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 16:48.


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