Raised This Month: $ Target: $400
 0% 

determine numeric value


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hypheni
Senior Member
Join Date: Jul 2011
Location: India
Old 04-17-2013 , 05:12   determine numeric value
Reply With Quote #1

In C it is pretty simple with few API calls but I'm not sure how to check the same in Pawn. I want to check integer numbers in a user chat. I'm thinking of checking ASCII of char and match accordingly.

Can anyone provide any samples ?
hypheni is offline
Send a message via Skype™ to hypheni
Podarok
BANNED
Join Date: Jan 2011
Location: Narnia
Old 04-17-2013 , 10:12   Re: determine numeric value
Reply With Quote #2

Use if equali or containi. Or if it doesnt work, contact layka_LUBII
Podarok is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 04-18-2013 , 00:09   Re: determine numeric value
Reply With Quote #3

Maybe you should provide us with examples of what you mean. There is already a function to convert a number string to a number: str_to_num() and str_to_float().
__________________
fysiks is offline
hypheni
Senior Member
Join Date: Jul 2011
Location: India
Old 04-19-2013 , 03:15   Re: determine numeric value
Reply With Quote #4

<Player 1> : I'm new to counter strike 1.6. My age is 12 year

On above text I like to check whether there is more than 2 numeric values in the string. Should I loop through all element and check with some api call and increase my counter ?
hypheni is offline
Send a message via Skype™ to hypheni
Leon M.
Senior Member
Join Date: Apr 2009
Location: Germany
Old 04-19-2013 , 07:51   Re: determine numeric value
Reply With Quote #5

Take a look at the regular expression. http://www.amxmodx.org/funcwiki.php?go=module&id=17
__________________
  • ZapTic - Paintball (Version 7.1.3 b1303)
  • Your #1 CS Paintball Server since 2008
  • 85.131.163.101:27015
Leon M. is offline
Reply


Thread Tools
Display Modes

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:56.


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