Raised This Month: $ Target: $400
 0% 

String Operations


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 10-09-2010 , 13:59   Re: String Operations
Reply With Quote #4

Quote:
Originally Posted by S34Qu4K3 View Post
Thanks Exolent
More questions:
if i want to operate with the first array Itīs well that i use:
PHP Code:
szPieces[0][3
??
How can i convert all the words using the ASCII alphabet to a number ej: A= 97, B=98 etc

Thank you and sorry for all my doubts
Using that code, here is what you would get:
Code:
// szInput = "Testing" szPieces[ 0 ][ 0 ] = 'T' szPieces[ 0 ][ 1 ] = 'e' szPieces[ 1 ][ 0 ] = 's' szPieces[ 1 ][ 1 ] = 't' szPieces[ 2 ][ 0 ] = 'i' szPieces[ 2 ][ 1 ] = 'n' szPieces[ 3 ][ 0 ] = 'g' szPieces[ 4 ][ 1 ] = '^0' or 0

Characters in Pawn are also integers.

Try this:
Code:
server_print( "'a' = %i", 'a' )
It will output:
Code:
'a' = 97
Also, a=97, b=98, and A=65, B=66.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
 



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 10:18.


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