help! it says it doesnt work! always says somethin wrong with the pos
Please format your code according to the discourse FAQ. Then I can help you.
As Neel_Sharma “says” without formatting we can’t tell for sure what the error is…
Having said that, I’d guess (what one has to do to try to help when formatting is missing and really why should we try guessing when it could just make us look stupid and unhelpful?) that the problem is that there is no item at the instant in time that the code runs, why do I guess that? because you never check for item (like you do for enemy). If there is no item there is no item.pos, and no item.pos --> error.
What Vlevo means is that you need to do elif item:
on the line where you put else:
otherwise if there is no item there will be an error.
You need at least the Crude Telephoto Glasses to see if the path is clear.
Mod edit: Please do not request solutions. The purpose of this board is to assist people with their code. Simply providing solutions is counter productive to the learning process. There are many people here willing and able to assist you with your code but we do not just give the answers. Thanks.
On the forum, People don’t give out straight-up answers. You have to state your problem, then people will try to help you solve this problem. Also, there really is no answer to this level. It is a replayable level.