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
Random spawn at edge of screen across screen
By GreenHead456, with 16 replies.
Last reply by GreenHead456, almost 7 years ago:
OK thanks, I will refer to this for future projects.
Putting images from the gallery into the code
By CodingCowgirl, with 2 replies.
Last reply by CodingCowgirl, almost 7 years ago:
I've already done this. But thanks for answering.
Checking arrangements of actors
By randomuser, with 7 replies.
Last reply by danpost, almost 7 years ago:
randomuser wrote...
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, almost 7 years ago:
Line 20 will always be executed because
isSeen
is being assigned a
true
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, almost 7 years ago:
Bluetiger wrote...
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, almost 7 years 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
iif
,
for
,
switch
,
do
,
while
, etc) should have one pair -- one at the beginning and one at its end. Any and all
excess
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, almost 7 years ago:
"At a set number of characters"? -- no. You could just make one yourself, if you wanted, however.
crash
By jbiser361, with 7 replies.
Last reply by jbiser361, almost 7 years 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, almost 7 years 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, almost 7 years ago:
bluebear11 wrote...
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, almost 7 years 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, almost 7 years ago:
Thank you that fixed my error
variable=otherVariable?
By Fargesia, with 2 replies.
Last reply by Fargesia, almost 7 years ago:
Ok many thanks I made it like that to get it working: <Code Omitted>Working just fine now, thanks!
Code problem
By RezaDK, with 1 reply.
Replied to by danpost, almost 7 years ago:
RezaDK wrote...
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
Control-Shift-I
, on
Windows
), you might spot it easier.
Problem by editing new project
By Pilo5201, with 1 reply.
Replied to by danpost, almost 7 years ago:
Change your "super" line to: <Code Omitted>
168
169
170
171
172
173
174
X