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)