Code which has been running fine all day suddenly gave me:
java.lang.RuntimeException: Uncompilable source code - incompatible types
This is code that has not been changed and ran before without error. Netbeans just suddenly won’t let me run it anymore. Literally nothing has changed. For this reason I’m only posting a small amount of code - wondering if anyone else has had a similar problem and knows what to do?
I have an interface: AI, and then a bunch of classes implement it, for example, Defender, Attacker, Keeper, Thrower and so on.
team1.players.ai.ai = new Defender(team1.players.ai,main.camControl.box); team1.players.ai.ai = new Thrower(team1.players.ai,main.camControl.box); team1.players.ai.ai = new Defender(team1.players.ai,main.camControl.box); team1.players.ai.ai = new Attacker(team1.players.ai,main.camControl.box);
The second line, Thrower, is whats causing the error. It doesn’t think it is of type AI. Changing it to Defender or other types works fine.
The Thrower class
public class Thrower implements AI
Showed me an error saying something about duplicate class… but when I moused over it the error quickly vanished so thats all I could catch. Again this code was all running fine and nothing has been changed.
I’m kinda confused.
EDIT: Restarted my pc and it went away? Now my sound has gone off for no obvious reason. Love it