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

2014/1/21

problems with adding object

deathburrito16 deathburrito16

2014/1/21

#
so, I am putting in the ordinary add object code, and it keeps saying, "Cannot find symbol-Variable ______"
Sherman sherman = new Sherman();
getWorld().addObject(Sherman, 100, 300);
davmac davmac

2014/1/21

#
You called the variable 'sherman', not 'Sherman'. You need to use the same name in the reference as you do in the declaration: getWorld().addObject(Sherman sherman, 100, 300);
You need to login to post a reply.