Here is my collaboration with the ultra-famous youtuber, Parker Morgan. Search him up.



There's a couple of things I see:
-
In
init()
you're callingmake_powerup(x,y)
but I don't see that x & y are defined anywhere. (but it looks like you are hardcoding those values later in the function, so this doesn't matter). -
In
make_powerup(x,y)
, you doe.type=rnd(3)
. That is likely not going to be an integer value, it'll be something like 0.8467. If you're looking for an integer value between 0-3, you want to doflr(rnd(4))
instead. - The other thing I can't find is where you define the powerup table. You call
add(powerup,e)
in themake_powerup(x,y)
function, but powerup isn't defined anywhere. My guess is that this is where your problem comes from.
[Please log in to post a comment]