Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some errors #5

Open
DeRobyJ opened this issue Mar 17, 2018 · 0 comments
Open

Some errors #5

DeRobyJ opened this issue Mar 17, 2018 · 0 comments

Comments

@DeRobyJ
Copy link

DeRobyJ commented Mar 17, 2018

I'm running the game on Python2
If it's intended to run on Python3 only, please state it in the readme.

line 1331: list indices must be integers, not float
I used int() around the indices.
This goes for most of the times you use the "mapData" matrix.
You did it too in line 508

line 1385: range() integer end argument expected, got float
"heartNum" is saved as a "ciel" of something: this doesn't make it int, I guess.
So again I used int() to fix

line 190
super().__init__(pos,"bird",vel)
TypeError: super() takes at least 1 argument (0 given)
I'm new to Python, but I think you need to write:
NPC.__init__(self, pos, "bird", vel)

I did a fix to these, if needed I can make a pull request.

The same problem with indices goes for some image loading:
img=images[240+math.floor((self.blocks[i][j].maxintegrity-self.blocks[i][j].integrity)/self.blocks[i][j].maxintegrity*9)]
math.floor doesn't return an int, but a float, so I'm still getting error for these.

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

No branches or pull requests

1 participant