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

2017/2/23

Outdated Version?

Freekywill Freekywill

2017/2/23

#
I am making a game, which works fine on my personal laptop, but this line of code doesn't compile when on my school computer, receiving the error message "cannot find symbol - variable type"
if(getObjectsInRange(20, InventorySlot.class).get(0).type == this.type)
danpost danpost

2017/2/23

#
Freekywill wrote...
I am making a game, which works fine on my personal laptop, but this line of code doesn't compile when on my school computer, receiving the error message "cannot find symbol - variable type" < Code Omitted >
Maybe it works in newer versions of greenfoot because of generics, where the object returned by 'getObjectsInRange' is 'List<InventorySlot>' (this was implemented somewhat recently).
You need to login to post a reply.