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

2011/11/17

non-static method cannot be referenced from a static context

1
2
bourne bourne

2011/11/17

#
Yes. "ActorType variable = new ActorType();" is the declaration. Reference basically means the same thing as a variable in this sense. They are "pointers" to some bits of memory representing something.
darkmist255 darkmist255

2011/11/17

#
Thanks for all the help! I think I finally understand references. (For self-enjoyment) Congradulations! Your Java skill improved by 1! You are now level 6! Next ability at level 20!
kiarocks kiarocks

2011/11/17

#
Ahhhh, thanks for the fish
danpost danpost

2011/11/17

#
I am not 100% positive, but I think that variable would have to be added to the world before aMethod() can be called on it (if it extends Actor). ANYBODY == correct me if I am wrong!!!
bourne bourne

2011/11/17

#
Only methods that have anything to do with location (including methods that get other Actors in the World). Pretty sure the rotation, the image, getWorld, and act methods are okay to do.
darkmist255 darkmist255

2011/11/25

#
Huzzah! I just had the "non-static method" problem for another scenario, but was able to fix it on my own! I'm making lots of progress, thanks again guys :D.
You need to login to post a reply.
1
2