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
5 Squares and per Square -10 size
By schniggi, with 2 replies.
Last reply by schniggi, over 5 years ago:
Thanks a lot!
java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
By DatHeroAndy, with 2 replies.
Last reply by DatHeroAndy, over 5 years ago:
danpost wrote...
DatHeroAndy wrote...
When I create the variable in line 34 I get this error: java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0 << Code Omitted >>
It is trying to tell you that the returned list is empty and therefore you cannot get any element from it. First check to ensure the list is NOT empty before trying to get an element from it.
Fixed it. Thanks for the explanation.
How can I spawn two Objects, in 2 different sizes?
By schniggi, with 5 replies.
Last reply by schniggi, over 5 years ago:
Nvm, it works
Object won't get removed.
By ItzLukeStorm, with 14 replies.
Last reply by ItzLukeStorm, over 5 years ago:
It worked, thanks.
how to spawn a Actor twice and give them diffrend movement
By EddiMitY, with 3 replies.
Last reply by DatHeroAndy, over 5 years ago:
Assign the Constructor of your Car with this variable: public Car(int turner) Car Code:
how do you make an object jump
By ninjapuffin, with 3 replies.
Last reply by ninjapuffin, over 5 years ago:
thanks
Saving a json file online
By RcCookie, with 8 replies.
Last reply by danpost, over 5 years ago:
RcCookie wrote...
I'm just taking the first million (based on the url of my account, there shouldn't be more than 100000 users).
Ah, but noone has a block when a scenario that uses it is first uploaded. Only when the scenario first does a "store" on a user does that user get a block; and that user must be signed in even for that to happen. So you might, over time, accumulate 100+ UserInfo blocks on a scenario.
Add obj
By Roshan123, with 40 replies.
Last reply by Roshan123, over 5 years ago:
danpost wrote...
Roshan123 wrote...
You have written 43 and 83 Do u wanted to write 42 and 82 or u have written correct
Strange, looks now like 36 thru 51 and 76 thru 91. I think you may have edited the post. Also adding crates should probably be included within the
initialize
method.
Sorry for that I edited it 3 timea and posted it
Scenario becomes unstable when creating setWorld Variable
By DatHeroAndy, with 10 replies.
Last reply by danpost, over 5 years ago:
danpost wrote...
You probably have two classes that unconditionally initiate one another (or multiple classes creating a loop of initiations).
I still think this is the issue.
Greenfoot set more images
By off.nika, with 10 replies.
Last reply by off.nika, over 5 years ago:
THank you so so so so much. I finally understood and it works. Thank you
Multi-thread bugs
By RcCookie, with 1 reply.
Replied to by RcCookie, over 5 years ago:
?
how can I add score to both characters?
By sxgdfhcjvk, with 2 replies.
Last reply by danpost, over 5 years ago:
sxgdfhcjvk wrote...
so im making my own game now and I have to count score for both of the characters, does anyone know hot to do that?
This is vague, without any attempted codes. Also, are the scores to be displayed or not?
While loop
By Sauravbasyalking12, with 3 replies.
Last reply by danpost, over 5 years ago:
Sauravbasyalking12 wrote...
Could you please name one thing that can go wrong with a while loop
One thing that can go wrong is that the condition to loop remains true indefinitely -- so, execution is "stuck" in the loop. It will make it seem the scenario is "frozen" as the process never completes.
Check if object exists at specific coordinate
By Suavessence, with 2 replies.
Last reply by Suavessence, over 5 years ago:
That helps, thank you!
Help with Greenfoot.getKey()
By DatHeroAndy, with 5 replies.
Last reply by RcCookie, over 5 years ago:
Sorry mate, didn’t test run it. Good that you figured out how to fix it
109
110
111
112
113
114
115
X