30.07.2018, 07:21
Is this a bad example of a Function?
I got an error about recursion.
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; }