Recursion
#1

Is this a bad example of a Function?

I got an error about recursion.

Код:
Function::RandomHospitalLoot()
{
	new ran = Random(0, MAX_LOOTITEMS-1);
	switch(ran)
	{
		case ITEM_MEDKIT, ITEM_BONDAGE, ITEM_FIRSTAID: return ran;
		default: return RandomHospitalLoot();
	}
	return ran;
}
Reply


Messages In This Thread
Recursion - by ToiletDuck - 30.07.2018, 07:21
Re: Recursion - by ToiletDuck - 30.07.2018, 07:42
Re: Recursion - by ToiletDuck - 30.07.2018, 07:47
Re: Recursion - by ball - 30.07.2018, 08:09
Re: Recursion - by Calisthenics - 30.07.2018, 08:12
Re: Recursion - by ToiletDuck - 30.07.2018, 08:24

Forum Jump:


Users browsing this thread: 1 Guest(s)