public void OnRequestFinishedButtonClicked() { // give items to NPC foreach (string id in questGoal.Keys) { bm.LoseItem(id, questGoal[id]); Debug.Log("Finish quest, you lost " + id + questGoal[id]); } requestFinishButton.gameObject.SetActive(false); // give reward to player foreach (string id in rewards) { bm.AddItem(id); Debug.Log("You get the reward" + id); } }