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

2016/11/30

Isn't starting up (again)

1
2
3
danpost danpost

2016/12/7

#
LakeOtis wrote...
danpost wrote...
I do not think the name class should extend the You class (it should extend Actor). Also, you did not include your characters class code here.
I thought I did, but here < Code Omitted >
You posted the 'You' class again. I wanted to see the 'characters' class code which was not yet posted.
Nosson1459 Nosson1459

2016/12/8

#
LakeOtis wrote...
public class You extends characters
...
The You class (which was posted twice) extends... characters, the "characters" class code hasn't been posted anywhere above.
LakeOtis LakeOtis

2016/12/8

#
oh, that doesn't have anything really, it's just got the "You" class and the "shopkeeper" class (which isn't currently being used) in it so that they're right next to each other. But here's the code:
import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

/**
 * Write a description of class characters here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class characters extends Actor
{
    /**
     * Act - do whatever the characters wants to do. This method is called whenever
     * the 'Act' or 'Run' button gets pressed in the environment.
     */
    public void act() 
    {
        // Add your action code here.
    }    
}
Nosson1459 Nosson1459

2016/12/8

#
I don't see any problems (or any loops at all for an infinite loop, besides the act) (which can sometimes happen even though other people do see, and solve them), have you restarted the program, or your computer ever since this problem occurred?
danpost danpost

2016/12/8

#
There is one more class that is not yet provided -- the 'shop' class. Everything else seems to be okay at first glance.
danpost danpost

2016/12/8

#
There is one more class that is not yet provided -- the 'shop' class. Everything else seems to be okay at first glance -- except for the fact that 'forSale' at line 23 in the You class is not defined. Maybe you meant 'shop' there.
Nosson1459 Nosson1459

2016/12/8

#
I didn't ask for the "shopkeeper" class because:
LakeOtis wrote...
the "shopkeeper" class (which isn't currently being used)
so I took that to mean it's as empty as the characters class. now I see the shop in the You class you cant setWorld forSale you have to do
setWorld(new forSale());
Nosson1459 Nosson1459

2016/12/8

#
You haven't even mentioned there was another class but danpost saw the
World shop;
shop = new shop();
in the You class.
danpost danpost

2016/12/8

#
Nosson1459 wrote...
I didn't ask for the "shopkeeper" class because: < Quote Omitted > so I took that to mean it's as empty as the characters class.
I believe what LakeOtis meant was that both the You and the shopkeeper classes extend the characters class. The shop class is a World subclass, however, not an Actor subclass.
Nosson1459 Nosson1459

2016/12/8

#
danpost wrote...
The shop class is a World subclass, however, not an Actor subclass.
I noticed that as you should see by reading my posts and edits.
danpost danpost

2016/12/8

#
Nosson1459 wrote...
danpost wrote...
The shop class is a World subclass, however, not an Actor subclass.
I noticed that as you should see by reading my posts and edits.
Noticed.
Nosson1459 Nosson1459

2016/12/8

#
:)
LakeOtis LakeOtis

2016/12/8

#
danpost wrote...
There is one more class that is not yet provided -- the 'shop' class. Everything else seems to be okay at first glance.
The 'shop' class shouldn't currently be used.
LakeOtis LakeOtis

2016/12/8

#
Nosson1459 wrote...
I don't see any problems (or any loops at all for an infinite loop, besides the act) (which can sometimes happen even though other people do see, and solve them), have you restarted the program, or your computer ever since this problem occurred?
yes, I am currently working on another project but would like to work more on this one.
danpost danpost

2016/12/8

#
LakeOtis wrote...
The 'shop' class shouldn't currently be used.
Well, what type world did you want to set active when the You object reached the house object?
There are more replies on the next page.
1
2
3