Raised This Month: $32 Target: $400
 8% 

[STOCK] Url encode stock


Post New Thread Reply   
 
Thread Tools Display Modes
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-20-2010 , 17:39   Re: [STOCK] Url encode stock
Reply With Quote #11

Quote:
Originally Posted by Alucard^ View Post
I have a little question...

I don't understand this simple thing in the code:

condition(c < 'a') for example... how a character can be MORE than other character? i need to reference by the alphabet? B > A? or what?

Sry for my english.

Oh and, good job joropito... this will help me when i need to use sockets.
When you reference 'a' with single quotes that means you are referencing the ASCII decimal value of that letter.

Make sure you use the fix that I just posted if you are going to use either of these functions.
__________________
fysiks is offline
Old 06-20-2010, 19:01
Alucard^
This message has been deleted by Alucard^. Reason: now i get it, dec and hex characters are differents
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 06-20-2010 , 19:01   Re: [STOCK] Url encode stock
Reply With Quote #12

Alu,

You should take a look on an ascii table to understand char to number conversion

http://www.asciitable.com/

A = 65
..
Z = 90

a = 97
..
z = 122
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 06-20-2010 , 19:03   Re: [STOCK] Url encode stock
Reply With Quote #13

Quote:
Originally Posted by joropito View Post
Alu,

You should take a look on an ascii table to understand char to number conversion

http://www.asciitable.com/

A = 65
..
Z = 90

a = 97
..
z = 122
Yes i know, i didnt think that when using a simple character 'a' is refering to the ASCII decimal character...

Thanks
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 06-20-2010 , 19:50   Re: [STOCK] Url encode stock
Reply With Quote #14

Quote:
Originally Posted by Alucard^ View Post
Yes i know, i didnt think that when using a simple character 'a' is refering to the ASCII decimal character...

Thanks
Note that "a" is not the same as 'a'
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 06-20-2010 , 20:49   Re: [STOCK] Url encode stock
Reply With Quote #15

Quote:
Originally Posted by fysiks View Post
Wow. I'm surprised nobody found out neither of these two stocks work correctly.

Joropito's code:

Code:
			if((len + 3) > c)
			{
				sResult[c] = 0
				break
			}
Fixed
Thanks
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 06-20-2010 , 23:14   Re: [STOCK] Url encode stock
Reply With Quote #16

Quote:
Originally Posted by joropito View Post
Note that "a" is not the same as 'a'
So... "a" is a string and 'a' is a character refering a decimal character in the ASCII table = 97, right?
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-20-2010 , 23:40   Re: [STOCK] Url encode stock
Reply With Quote #17

Quote:
Originally Posted by Alucard^ View Post
So... "a" is a string and 'a' is a character refering a decimal character in the ASCII table = 97, right?
"a" is an array (string)

"a" = { 'a', 0 } = { 97, 0 }

'a' is an integer

'a' = 97
__________________
fysiks is offline
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 06-21-2010 , 00:14   Re: [STOCK] Url encode stock
Reply With Quote #18

Oh, i get it... yes i understood something similar but not 100% correct about that... thanks for clarify me this.
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
Old 06-28-2010, 23:54
qt0416
This message has been deleted by YamiKaitou. Reason: spambot
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 23:56.


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