Can someone explain this? (getarg)
#1

Код:
stock SubtractNumber(...)
	{
		new result = 0;
		for(new i = 0; i < numargs(); ++i)
		{
			result = result - getarg(i);

			printf("Arg %d = %d", i,getarg(i));
		}
		return result;
	}
If I input 15, 5 and 4, it outputs -24. So it basically just adds them and inverts it. Why does it do this? (This function is just for testing purposes)
Reply


Messages In This Thread
Can someone explain this? (getarg) - by sammp - 22.02.2016, 02:08
Re: Can someone explain this? (getarg) - by Chump - 22.02.2016, 03:00
Re: Can someone explain this? (getarg) - by sammp - 22.02.2016, 14:45

Forum Jump:


Users browsing this thread: 1 Guest(s)