This site requires JavaScript, please enable it in your browser!
Greenfoot back
Lasklu
Lasklu wrote ...

2018/3/6

I need help for my schoolproject! Without this problem it would be finished! Thank You!

Lasklu Lasklu

2018/3/6

#
Good Evening! I have to program for a school project a program with greenfoot. I have finished almost everything but I have on problem. You can see it in the yt-video below. So when I have crashed into the car, I will lose my wood. But if I want to take anotherone I have the problem that the shown wood will stay on the ground and I have one in my hand(of my character). It is duplicated. But this happens only if I take the same wood. In the clip you can also see my code. "Holz" means wood:D I have checked my variables. I think the problem is somewhere while spawning the wood. Is it possible that the program does not think it is the same wood becaus it has no array(like in the class world)? Whats the best way to fix this? I hope you understand everything! Thank you!
Super_Hippo Super_Hippo

2018/3/6

#
It is basically impossible to read the code because it is uploaded in only 480p. It would be much easier if you copy and paste it here or upload you project and make it open source. But in general, I don't think that you need any of these Exception things, the use of swing or arrays for the wood. It seems like you over-complicate your project.
danpost danpost

2018/3/6

#
The only way wood would be duplicated is if you used 'new Holz()' somewhere other than in your World constructor or called a method that contains 'new Holz()' from somewhere other than your World constructor. So, if you search your classes for that string, you should only find it in your MyWorld class. Then search for the method name at which it is found. Then repeat if necessary. You should not end up anywhere other than 'public MyWorld()'.
Lasklu Lasklu

2018/3/6

#
Here is my yt Clip: https://youtu.be/MU4t6-MDEPw
danpost danpost

2018/3/6

#
Do not continue to create user accounts. Because you used a link in your first post, you were flagged for moderator review. Once cleared, you will be able to continue to post here.
davmac davmac

2018/3/6

#
Lasklu: please do not create extra accounts to try and get around our spam filters. Here is the text that you received each time you tried to post your video, which you did four times:
Your post has been selected for review. Your ability to post has been temporarily disabled, until the post can be reviewed by an administrator. Your post should be reviewed within 24 hours (usually sooner). Once approved, your post will become visible and your ability to post will be reactivated. You will not usually need to have any future posts reviewed. This review process is designed to combat spam. There is no need to worry - unless your post is spam/offensive, it will be approved within 24 hours and you will be able to post again after that time. If your post is not approved within 24 hours please email support@greenfoot.org. Please do not email in regards to post approval before 24 hours has elapsed.
I think that's quite clear. You need to have patience. I will delete your second, third and fourth account. By doing this you are just creating unnecessary work for us!
Lasklu Lasklu

2018/3/7

#
Yes davmac and danpost I am very sorry for my fault. I did not exactly tramslated everything of the text which I received. Firstly I thought the was only an error with my account. But after the fourth time I have read it exactly and i understood the message. This will not happen again.I´m sorry for that! What I wanted to write was that I have uploaded my project on greenfoot. This is the link: http://www.greenfoot.org/scenarios/20962 . It would be amazing if you could help despite this aggravting and bad mistake on my side!
You need to login to post a reply.