Skip to content

Phil fix part 3#1

Open
plight-cmu wants to merge 9 commits intoplight-cmu:mainfrom
mkshin75:phil-fix-part-3
Open

Phil fix part 3#1
plight-cmu wants to merge 9 commits intoplight-cmu:mainfrom
mkshin75:phil-fix-part-3

Conversation

@plight-cmu
Copy link
Owner

When I try to run your part 3 script, it threw an error instead of running to completion. This set of fixes seem to address the problem. Did you recently change your JSON structure?

mkshin75 and others added 9 commits September 20, 2023 00:28
1. printed string of the part1 map
2. screenshot
When running part_3_convert_json.py, script would not run. Fix that

Problem:
    game_level.level_number = json_data[lv]["level_number"]
                              ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
TypeError: list indices must be integers or slices, not str

Fix:
* change format of main for loop which loads level JSON data
* change the way contents of the level data are read.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants