Watts-College / cpp-527-fall-2022

https://watts-college.github.io/cpp-527-fall-2022/
0 stars 1 forks source link

Issues in Step 4 #4

Open BHammons1 opened 2 years ago

BHammons1 commented 2 years ago

My steps 1-3 all work fine. However, when I get to Step 4 I run into this issue.

snip 8 24

I don't understand why it's saying that object "final.pick" isn't found when final.pick is assigned right there in the code? Any suggestions about what's going on here would be great!

AndrewSchwarz145 commented 2 years ago

You should use the code made to test it:

opened.door <- open_goat_door( this.game, my.initial.pick )

change_door( stay=T, 
             opened.door=opened.door, 
             a.pick=my.initial.pick )
change_door( stay=F, 
             opened.door=opened.door, 
             a.pick=my.initial.pick )

my.final.pick <- change_door( stay=F, 
                              opened.door=opened.door, 
                              a.pick=my.initial.pick )

this.game
my.initial.pick
my.final.pick 

Otherwise it won't have the values to fill in for the arguments since the function doesn't have defaults. I think that should solve the problem...

mboudour commented 2 years ago

I need to see your open_goat_door function. This should be the problem.

On Wed, Aug 24, 2022 at 7:41 PM BHammons1 @.***> wrote:

My steps 1-3 all work fine. However, when I get to Step 4 I run into this issue.

[image: snip 8 24] https://urldefense.com/v3/__https://user-images.githubusercontent.com/111549286/186561551-e452dd78-b613-4df1-a755-095369901dc4.png__;!!IKRxdwAv5BmarQ!d9xZnkeNb35MYXX9zo4GJa_s2YNTgD8POlQbD8wir1A4VtZbvk_EXykj4N0Mcuu98EMkPHDtq0JsyLeliVkLNuGJY9VaVoQ$

I don't understand why it's saying that object "final.pick" isn't found when final.pick is assigned right there in the code? Any suggestions about what's going on here would be great!

— Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https://github.com/Watts-College/cpp-527-fall-2022/issues/4__;!!IKRxdwAv5BmarQ!d9xZnkeNb35MYXX9zo4GJa_s2YNTgD8POlQbD8wir1A4VtZbvk_EXykj4N0Mcuu98EMkPHDtq0JsyLeliVkLNuGJER1_uiM$, or unsubscribe https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AATHZXJBHGXV3HBDT3E764LV23MLRANCNFSM57RNNG7A__;!!IKRxdwAv5BmarQ!d9xZnkeNb35MYXX9zo4GJa_s2YNTgD8POlQbD8wir1A4VtZbvk_EXykj4N0Mcuu98EMkPHDtq0JsyLeliVkLNuGJxelZQps$ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Moses Boudourides (pronounced Bo͝odo͝orēT͟Həs) Professor of Practice at the School of Public Affairs, Arizona State University Phone: 484 534-0290 http://mboudour.github.io/about/

BHammons1 commented 2 years ago

@AndrewSchwarz145 That fixed it, didn't notice that I didn't have the first portion in their to actually test the code. Thank you!