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

2014/1/13

Stop the scoreboard.

1
2
Jabadu Jabadu

2014/1/14

#
Ok, it's up now.
danpost danpost

2014/1/14

#
Do it again. This time make sure the 'Publish source code' checkbox is checked.
Jabadu Jabadu

2014/1/14

#
It's updated now.
danpost danpost

2014/1/14

#
I got it. So if you want to delete it now, go ahead.
Jabadu Jabadu

2014/1/14

#
Ok, I will for now.
Jabadu Jabadu

2014/1/14

#
If you have time, you can also check my "PikaTelo" as snake tail after you find the mistake with scoreboard. Because I try to make that when my "Pika" crash in its tail, the world restart. But I kinda complicated.. You'll see if you check (in Pika class - method "crush"). And thanks for help !
danpost danpost

2014/1/14

#
Ok. I added a method to both the Pika and Pika1 classes.
private void newWorld()
{
    Zid zid = new Zid();
    zid.counter1.setValue(counter1.getValue());
    zid.counter.setValue(((Zid)getWorld()).counter.getValue());
    Greenfoot.setWorld(zid);
}
Then I replaced lines 79 and 228 with 'newWorld();' (the 'Greenfoot.setWorld(new Zid());' lines in both classes). Finally, remove both the konecRunde and the zacetekNoveRunde methods from both classes; and all calls to them.
Jabadu Jabadu

2014/1/14

#
I have a problem. No syntax error but when I try to run there is Null... error in (04) row in that what you paste here..
danpost danpost

2014/1/14

#
Oh, I forgot. Your counter fields in your world class were never being set because you are creating local fields in the prepare method instead of using the world instance fields. Remove 'Counter ' from the beginning of the two lines that create (using the 'new' keyword') the Counter objects.
Jabadu Jabadu

2014/1/14

#
Ok. I kinda fix the problem, so my counter actually works now. I set the limit value in the Counter class and now it works correct. Thank you for all the help !
You need to login to post a reply.
1
2