getarg, setarg and numarg
#7

Quote:
Originally Posted by Kaliber
View Post
As the function says...it sets the value of an argument..for example:

PHP Code:
stock setter(...)
{
    
setarg(0,0,999);
}
//Usage:
new x=0;
setter(x);
//and now x=999 
The usage:

PHP Code:
setarg(argindex=0value
First the argument...in this case 0...cause we only pass 1 argument, and we know its always on the first place so 0.
The index of integer Values is always 0 (only for strings to go through an arrays it can be 0-sizeof(arr))
And last the value you wanna set
Thank you very much, would have repped you for the three comments but I'm limited to one
Last thing, on this:
PHP Code:
 for(new numargs() - 1i!=0i--) 
Why -1 on the new i ?
Reply


Messages In This Thread
getarg, setarg and numarg - by NeXoR - 30.09.2016, 21:12
Re: getarg, setarg and numarg - by Kaliber - 30.09.2016, 21:23
Re: getarg, setarg and numarg - by NeXoR - 30.09.2016, 21:25
Re: getarg, setarg and numarg - by Kaliber - 30.09.2016, 21:27
Re: getarg, setarg and numarg - by NeXoR - 30.09.2016, 21:30
Re: getarg, setarg and numarg - by Kaliber - 30.09.2016, 21:34
Re: getarg, setarg and numarg - by NeXoR - 30.09.2016, 21:37
Re: getarg, setarg and numarg - by SickAttack - 30.09.2016, 22:13
Re: getarg, setarg and numarg - by GoldenLion - 30.09.2016, 22:14
Re: getarg, setarg and numarg - by SickAttack - 30.09.2016, 22:15

Forum Jump:


Users browsing this thread: 1 Guest(s)