Skip to content

Comments

Convert color_bk from float to int for indexing#1

Open
azacha wants to merge 1 commit intomasterfrom
patch-colors_hexcolor_bk]-typeError
Open

Convert color_bk from float to int for indexing#1
azacha wants to merge 1 commit intomasterfrom
patch-colors_hexcolor_bk]-typeError

Conversation

@azacha
Copy link
Owner

@azacha azacha commented Dec 20, 2020

color_bk is a float, but used for indexing. So to work it has to be converted to int

Traceback (most recent call last):
File "combat.py", line 145, in
background(screen, 0, WINDOWHEIGHT, colors_hex[color_bk])
TypeError: list indices must be integers or slices, not float

color_bk is a float, but used for indexing. So to work it has to be converted to int

Traceback (most recent call last):
  File "combat.py", line 145, in <module>
    background(screen, 0, WINDOWHEIGHT, colors_hex[color_bk])
TypeError: list indices must be integers or slices, not float
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.

1 participant