Raised This Month: $ Target: $400
 0% 

Getting arguments


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Votorx
Senior Member
Join Date: Jun 2004
Old 02-07-2005 , 11:56   Getting arguments
Reply With Quote #1

When you get an argument from a function using read_argv, how can you get numbers? I thought u can just do it just like this:

new temp[3]
read_argv(id,temp,3)
new number = str_to_num(temp)

only problem is, number = 0, always.

How can I get numbers from the argument?

Also, does ns_set_points() and ns_set_exp() actually work? If so how can I use them?
__________________
Currently Looking for a mod team.
Votorx is offline
Send a message via AIM to Votorx Send a message via MSN to Votorx Send a message via Yahoo to Votorx
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 02-07-2005 , 14:43   Re: Getting arguments
Reply With Quote #2

Quote:
Originally Posted by Votorx
When you get an argument from a function using read_argv, how can you get numbers? I thought u can just do it just like this:

new temp[3]
read_argv(id,temp,3)
new number = str_to_num(temp)

only problem is, number = 0, always.

How can I get numbers from the argument?

Also, does ns_set_points() and ns_set_exp() actually work? If so how can I use them?
1. Your array is size 3. At most you can read 2 characters into it to save space for the null terminator.

2. Be sure to get the right parameter # into the first parameter of read_argv(). To me it looks a little unspecified in your example.

Code:
new szFirstParameter[32] read_argv(1, szFirstParameter, 31) new iFirstParameter= str_to_num(szFirstParameter)
Johnny got his gun is offline
Votorx
Senior Member
Join Date: Jun 2004
Old 02-07-2005 , 19:39  
Reply With Quote #3

Wow, your right. I just realized that. Lmao, I haven't taken in arguments in such a long time I forgot how to use it.

Ty
__________________
Currently Looking for a mod team.
Votorx is offline
Send a message via AIM to Votorx Send a message via MSN to Votorx Send a message via Yahoo to Votorx
HIM666
Member
Join Date: Jan 2005
Location: Portland, Oregon
Old 02-08-2005 , 23:57  
Reply With Quote #4

ADSA
__________________
removed due to size
HIM666 is offline
Send a message via AIM to HIM666
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 19:19.


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