Sign Up, Lost Password
You need to login to take part
Random spawn at edge of screen across screen
By GreenHead456, with 11 replies.
Last reply by danpost, about 6 hours ago:
So now I have my addedToWorld() code written up: << Code Omitted >> I also know that the world(Water) class should call the object into existence, so my question is how would I call it into the world class
Looks like an infinite loop waiting to happen. If line 9 assigns any number other than zero on the first time through the
loop, the condition to repeat will never be false. I am not sure how your code will prevent the actors from moving toward the corner they are placed in at times, although the chance is somewhat low. I was thinking you should h
Checking arrangements of actors
By randomuser, with 7 replies.
Last reply by danpost, about 7 hours ago:
with that, my code pops up with an error saying 'incompatible types: boolean cannot be converted to boolean' (I'm sorry about this code never quite seeming to work)
Sorry -- my bad. It was supposed to be: <Code Omitted>
Image Constantly Blinks/Changes
By m0nday_, with 1 reply.
Replied to by danpost, 2 days ago:
Line 20 will always be executed because
is being assigned a
value in line 19. That is, line 19 is equivalent to: <Code Omitted>To compare values, use the conditional equality operator, '
'. As: <Code Omitted>
text box or image showing up when character goes on top of character
By Bluetiger, with 6 replies.
Last reply by danpost, 3 days ago:
That game seems quite helpful. Is there anyway I could see the code for it?
Run the scenario. Click on buttons (ground platforms -- "Where", "What" and "Who" buttons).
Help with organizing my programming so it looks better and fixing errors
By KIOP, with 15 replies.
Last reply by danpost, 6 days ago:
The class code itself should have one pair -- one (opening bracket) after the class declaration line and one (closing bracket) at the end of the class. Each method, likewise, should have one pair -- one after the declaration line and one at its end. Any and all local code blocks (for
, etc) should have one pair -- one at the beginning and one at its end. Any and all
brackets must be removed (see lines 24 and 50).
Left justify and paragraph form a long line of string
By protocolUnknown, with 1 reply.
Replied to by danpost, 6 days ago:
"At a set number of characters"? -- no. You could just make one yourself, if you wanted, however.
By jbiser361, with 7 replies.
Last reply by jbiser361, 7 days ago:
ooh I see! thank you so much!
how to add more time when you pick up a item
By dragnslayer, with 3 replies.
Last reply by danpost, 8 days ago:
Apparently, you need to subtract from the timer to increase game time (which is what I presume you want to do). There is insufficient information to help any further.
How do I auto generate an ID using arrays? And how do i create a freight status for each freight order?
By bluebear11, with 2 replies.
Last reply by danpost, 9 days ago:
I just thought it was required to store the number in the array and have it auto incremented. This is what I attempted although I know it is completely wrong << Code Omitted >> I just cant seem to understand how I should auto generate and increment a freight ID as well as create a freight status for every new order. Thanks for any help in advance
Hint: the assignment is asking you to describe an object; that is, create a class that creates freight order objects. It will have an ID and a status (as fields). The value of these fields should be assigned during th
doing Greenfoot book exercise getting error at the end
By KIOP, with 1 reply.
Replied to by danpost, 9 days ago:
There is no end to your class (no bracket to pair up with the one on line 7).
One Eror in code
By KIOP, with 9 replies.
Last reply by KIOP, 10 days ago:
Thank you that fixed my error
By Fargesia, with 2 replies.
Last reply by Fargesia, 10 days ago:
Ok many thanks I made it like that to get it working: <Code Omitted>Working just fine now, thanks!
By RezaDK, with 1 reply.
Replied to by danpost, 11 days ago:
Do you know what is the problem of my coding in the pic? << Link Omitted >> BR
Looks like you are missing a class closing squiggly bracket at the end. If you indent properly (use
), you might spot it easier.
Problem by editing new project
By Pilo5201, with 1 reply.
Replied to by danpost, 12 days ago:
Change your "super" line to: <Code Omitted>
Problems with getOneIntersectingOnject
By RcCookie, with 2 replies.
Last reply by RcCookie, 14 days ago:
You are right with the classes, I´m not that good at java just jet. Also, my problem was solved simply by adding these brackets around the "getOneIntersectingObject()" and adding the "(Surface)". I knew the problem with the nullPointExeption though. Thanks a lot, RcCookie