This site requires JavaScript, please enable it in your browser!
Greenfoot
Username
Password
Remember Me?
Sign Up, Lost Password
Activity
About
Documentation
Download
Discuss
Scenarios
Discussions
You need to login to take part
Current Discussions
java.lang.NullPointerException
By JetLennit, with 1 reply.
Replied to by Gevater_Tod4711, over 12 years ago:
If a method should return an object which contains a method and you call this method like this methodReturningAnObject().methodOfTheReturnedObject(); It is possible that the first method returns null. That would be the same as null.methodOfTheReturnedObject(); what doesn't realy make sense. In this cases you get a NullPointerException which tells you that something went wrong.
+= and -=
By Kartoffelbrot, with 3 replies.
Last reply by JetLennit, over 12 years ago:
So basically, what I said.
How to import my own method?
By Kartoffelbrot, with 3 replies.
Last reply by Kartoffelbrot, over 12 years ago:
The (SuperClass) in front of getOneIntersectingObject(clss) was the thing I was looking for. Thank you.
computing sine and cosine in greenfoot
By arucker90, with 2 replies.
Last reply by Kartoffelbrot, over 12 years ago:
Thank you, too.
UserInfo object that is always avaliable.
By Gevater_Tod4711, with 6 replies.
Last reply by Gevater_Tod4711, over 12 years ago:
Ok so there is no way to do this. I'll try to use the adaptive code somehow else. Thanks guys.
Making a PiƱata
By Artaphawp, with 4 replies.
Last reply by danpost, over 12 years ago:
Crudely written, the code would look something like the following: <Code Omitted>As an added effect, the next line could be: <Code Omitted>this will cause the pendulum to eventually settle. However, starting a new swing will require some work determining what the counter valu
Collecting objects won't work.
By h123n, with 4 replies.
Last reply by danpost, over 12 years ago:
Deleting the object does not reset the variable. The variable stays with the object you delete. However, if there are no more references to the object, it will no longer be accessible to you and it will be flagged for garbage collection. Each object you create from that class will have a seperate variable with that name; this is why we call those variables 'instance object variables' (or 'instance object fields'; a.k.a. 'properties'); since each instance created from that class will have a set of its own.
Concatenate
By welleid, with 4 replies.
Last reply by welleid, over 12 years ago:
Okay, thanks a lot for your help !
How do I make an object move upwards?
By h123n, with 4 replies.
Last reply by danpost, over 12 years ago:
You need to place the new Lazer object in the world relative to the location of the EnergyBall object. <Code Omitted>
java.lang.NullPointerException
By noweh, with 2 replies.
Last reply by noweh, over 12 years ago:
Thanks a lot. It works perfectly
How to let others people who without the greefoot software play the game ?
By Night_Moon, with 4 replies.
Last reply by Night_Moon, over 12 years ago:
Thank you for all of you .
Image rotation
By GreenGoo, with 15 replies.
Last reply by GreenGoo, over 12 years ago:
Thanks, I'll try it.
java.lang.NullPointerException
By welleid, with 10 replies.
Last reply by danpost, over 12 years ago:
That usually means you have you have something in the wrong place. Possibly something in the act method (or a method it calls) that should be either in the constructor of the object or in the 'started' or 'addedToWorld' method. Another possibility is not regulation the number of objects that are created in the act method (one being created every act frame). Without seeing your complete error message and the related code, it would be difficult to help you further.
Help with Greeps
By ruskenberry, with 2 replies.
Last reply by ADEStudios, over 12 years ago:
See our scenario: http://www.greenfoot.org/scenarios/7266 And our website, ade-studios.weebly.com We don't provide source code as it would ruin the competition, but we give useful hints.
Shooting Problems
By cecarson, with 3 replies.
Last reply by davmac, over 12 years ago:
You just have to alter the coding for where the bullet is created, and where it moves.
859
860
861
862
863
864
865
X