# I need help on my cooking game

**URL:** <https://forum.makecode.com/t/i-need-help-on-my-cooking-game/3332>\
**Category:** Help\
**Created:** [September 3, 2020, 1:58pm UTC](https://forum.makecode.com/t/i-need-help-on-my-cooking-game/3332 "2020-09-03T13:58:40Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dreadmask197](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/dreadmask197/32/10494_2.png) [@Dreadmask197](https://forum.makecode.com/u/Dreadmask197)\
**Post date:** [September 3, 2020, 1:58pm UTC](https://forum.makecode.com/t/i-need-help-on-my-cooking-game/3332/1 "2020-09-03T13:58:40Z")

</div>

> **[cook](https://arcade.makecode.com/48791-22759-15676-04475)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

I want the person to order something and then I serve it to them. the serving and the ordering Is the problem. Can anyone help?

---

<div class="post-metadata">

**Author:** ![purna079](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/purna079/32/4018_2.png) [@purna079](https://forum.makecode.com/u/purna079)\
**Post date:** [September 3, 2020, 3:33pm UTC](https://forum.makecode.com/t/i-need-help-on-my-cooking-game/3332/2 "2020-09-03T15:33:36Z")

</div>

I tweaked the game a bit, see if this helps! [https://makecode.com/\_64YPVVXs55aw](https://makecode.com/_64YPVVXs55aw)

---

<div class="post-metadata">

**Author:** ![Dreadmask197](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/dreadmask197/32/10494_2.png) [@Dreadmask197](https://forum.makecode.com/u/Dreadmask197)\
**Post date:** [September 3, 2020, 5:07pm UTC](https://forum.makecode.com/t/i-need-help-on-my-cooking-game/3332/3 "2020-09-03T17:07:24Z")

</div>

It didn’t work. It kept pausing after the order was given out

---

<div class="post-metadata">

**Author:** ![purna079](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/purna079/32/4018_2.png) [@purna079](https://forum.makecode.com/u/purna079)\
**Post date:** [September 3, 2020, 5:14pm UTC](https://forum.makecode.com/t/i-need-help-on-my-cooking-game/3332/4 "2020-09-03T17:14:06Z")

</div>

Okay I’ll fix it

---

<div class="post-metadata">

**Author:** ![purna079](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/purna079/32/4018_2.png) [@purna079](https://forum.makecode.com/u/purna079)\
**Post date:** [September 3, 2020, 5:21pm UTC](https://forum.makecode.com/t/i-need-help-on-my-cooking-game/3332/5 "2020-09-03T17:21:07Z")

</div>

I think this might work [https://makecode.com/\_XqyEcKYgaAVc](https://makecode.com/_XqyEcKYgaAVc)

---

<div class="post-metadata">

**Author:** ![livcheerful](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/livcheerful/32/3509_2.png) [@livcheerful](https://forum.makecode.com/u/livcheerful)\
**Post date:** [September 3, 2020, 5:22pm UTC](https://forum.makecode.com/t/i-need-help-on-my-cooking-game/3332/6 "2020-09-03T17:22:25Z")

</div>

i made some changes here! I also added notes to explain what I did - lemme know if you have thoughts!

> **[cook - Vivian edition](https://arcade.makecode.com/07816-95100-57478-94405)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/1/15f463607fe7ed8238710b0f01f51249d0ca9ead.png)

---

<div class="post-metadata">

**Author:** ![Dreadmask197](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/dreadmask197/32/10494_2.png) [@Dreadmask197](https://forum.makecode.com/u/Dreadmask197)\
**Post date:** [September 3, 2020, 6:58pm UTC](https://forum.makecode.com/t/i-need-help-on-my-cooking-game/3332/7 "2020-09-03T18:58:44Z")

</div>

After I make the food. I can make him go away and get another customer

---

<div class="post-metadata">

**Author:** ![Dreadmask197](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/dreadmask197/32/10494_2.png) [@Dreadmask197](https://forum.makecode.com/u/Dreadmask197)\
**Post date:** [September 3, 2020, 6:59pm UTC](https://forum.makecode.com/t/i-need-help-on-my-cooking-game/3332/8 "2020-09-03T18:59:15Z")

</div>

I didn’t even make his food yet

---

<div class="post-metadata">

**Author:** ![Dreadmask197](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/dreadmask197/32/10494_2.png) [@Dreadmask197](https://forum.makecode.com/u/Dreadmask197)\
**Post date:** [September 3, 2020, 6:59pm UTC](https://forum.makecode.com/t/i-need-help-on-my-cooking-game/3332/9 "2020-09-03T18:59:56Z")

</div>

And my ingredients did go down. Any ideas @livcheerful

---

<div class="post-metadata">

**Author:** ![livcheerful](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/livcheerful/32/3509_2.png) [@livcheerful](https://forum.makecode.com/u/livcheerful)\
**Post date:** [September 3, 2020, 9:57pm UTC](https://forum.makecode.com/t/i-need-help-on-my-cooking-game/3332/10 "2020-09-03T21:57:44Z")

</div>

wait what’s the behavior you’re seeing again? have you changed the code? I left TODOs in it - the code I dropped won’t have the customer leaving, or checking to see if it’s correct

---

<div class="post-metadata">

**Author:** ![Dreadmask197](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/dreadmask197/32/10494_2.png) [@Dreadmask197](https://forum.makecode.com/u/Dreadmask197)\
**Post date:** [September 3, 2020, 10:20pm UTC](https://forum.makecode.com/t/i-need-help-on-my-cooking-game/3332/11 "2020-09-03T22:20:09Z")

</div>

I looked for what he wanted to order, and then after i pressed A after the string of text, he already said yay i love my food and he didnt leave

---

<div class="post-metadata">

**Author:** ![livcheerful](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/livcheerful/32/3509_2.png) [@livcheerful](https://forum.makecode.com/u/livcheerful)\
**Post date:** [September 3, 2020, 10:34pm UTC](https://forum.makecode.com/t/i-need-help-on-my-cooking-game/3332/12 "2020-09-03T22:34:13Z")

</div>

ah yeah I just left that as a TODO if you want to try it out!

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/9/93315f036e7176f8f8e3b652d8a2769c280f6437.png)

you should check the order, and based on if it’s right, return true or false in this function

and for having him leave, I left another spot here:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/5/560d17dd48cb9c344e5d1a1d529b1af0a9b4d435.png)  
where you should add the behavior of destroying the customer and then creating a new one

---

<div class="post-metadata">

**Author:** ![Dreadmask197](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/dreadmask197/32/10494_2.png) [@Dreadmask197](https://forum.makecode.com/u/Dreadmask197)\
**Post date:** [September 3, 2020, 10:48pm UTC](https://forum.makecode.com/t/i-need-help-on-my-cooking-game/3332/13 "2020-09-03T22:48:41Z")

</div>

So on the function, you left the check order to make me use it to see if it’s correct or bot

---

<div class="post-metadata">

**Author:** ![Dreadmask197](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/dreadmask197/32/10494_2.png) [@Dreadmask197](https://forum.makecode.com/u/Dreadmask197)\
**Post date:** [September 3, 2020, 10:49pm UTC](https://forum.makecode.com/t/i-need-help-on-my-cooking-game/3332/14 "2020-09-03T22:49:27Z")

</div>

What should I add, the order variable

---

<div class="post-metadata">

**Author:** ![livcheerful](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/livcheerful/32/3509_2.png) [@livcheerful](https://forum.makecode.com/u/livcheerful)\
**Post date:** [September 3, 2020, 10:50pm UTC](https://forum.makecode.com/t/i-need-help-on-my-cooking-game/3332/15 "2020-09-03T22:50:20Z")

</div>

Yeah! You should check the ingredients you’ve collected so far, and see if it fits the order

---

<div class="post-metadata">

**Author:** ![Dreadmask197](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/dreadmask197/32/10494_2.png) [@Dreadmask197](https://forum.makecode.com/u/Dreadmask197)\
**Post date:** [September 3, 2020, 10:51pm UTC](https://forum.makecode.com/t/i-need-help-on-my-cooking-game/3332/16 "2020-09-03T22:51:30Z")

</div>

What if i have like 5 of each ingriedient? will it say that the order is wrong

---

<div class="post-metadata">

**Author:** ![Dreadmask197](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/dreadmask197/32/10494_2.png) [@Dreadmask197](https://forum.makecode.com/u/Dreadmask197)\
**Post date:** [September 3, 2020, 10:53pm UTC](https://forum.makecode.com/t/i-need-help-on-my-cooking-game/3332/17 "2020-09-03T22:53:11Z")

</div>

Also what do i put in the “true”

---

<div class="post-metadata">

**Author:** ![livcheerful](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/livcheerful/32/3509_2.png) [@livcheerful](https://forum.makecode.com/u/livcheerful)\
**Post date:** [September 3, 2020, 10:54pm UTC](https://forum.makecode.com/t/i-need-help-on-my-cooking-game/3332/18 "2020-09-03T22:54:48Z")

</div>

so I would do something like this:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/7/70a83e537b953d45b85b996ef2071abf3b7268ed.png)

but for all the possible meals.

And returning just “true” or “false” will be fine!

---

<div class="post-metadata">

**Author:** ![Dreadmask197](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/dreadmask197/32/10494_2.png) [@Dreadmask197](https://forum.makecode.com/u/Dreadmask197)\
**Post date:** [September 3, 2020, 10:56pm UTC](https://forum.makecode.com/t/i-need-help-on-my-cooking-game/3332/19 "2020-09-03T22:56:15Z")

</div>

Would i need to do that 3 time for the sauce and shrimp, and the rice and suce?

---

<div class="post-metadata">

**Author:** ![livcheerful](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/livcheerful/32/3509_2.png) [@livcheerful](https://forum.makecode.com/u/livcheerful)\
**Post date:** [September 3, 2020, 10:58pm UTC](https://forum.makecode.com/t/i-need-help-on-my-cooking-game/3332/20 "2020-09-03T22:58:08Z")

</div>

yessssss! you can use a loooong “if else” statement, and have three “true” cases, and one “false” case

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/f/f063a0d13048a536c1b8afb31dad395138b9178c.png)

[Next page](https://forum.makecode.com/t/i-need-help-on-my-cooking-game/3332.md?page=2)
