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

2012/8/28

Get Variables from an Actor to a World

1
2
Barador Barador

2012/9/23

#
Problem in line 6 with ".value" Error: "non-static variable cannot be referenced from a static content"
danpost danpost

2012/9/23

#
Get back in a minute.
danpost danpost

2012/9/23

#
Move line 16 to your field declaration area (lines 6 through 10) and change line 17 to the following:
addObject(nib, (getWidth()/8)*6, getHeight()/2);
Then change 'NumberInputBox' in line 6 of the code I provided for your act method to 'nib'.
Barador Barador

2012/9/27

#
Do I have to change the class name from NumberInputBox to nib too? Because now I have an error in line 6 at the first "nib". I got it like this, or is this wrong?:
nib nib = new NumberInputBox();
"cannot find symbol - class nib"
MatheMagician MatheMagician

2012/9/27

#
If the name of the class is NumberInputBox, then just change that line of code to:
NumberInputBox nib = new NumberInputBox();
You need to login to post a reply.
1
2