Problem with creating objects
By Gevater_Tod4711, with no replies.
Hi guys,
I got a problem with one of my classes in my Super Mario game.
Specifically with constructing an instance of this object:
When I try to create a new instance of this class by rightclicking on the class in the list of classes there is the problem that I can't create the object using a specific constructor: Switch(boolean, boolean).
No mater what I tipe in it always says 'instance name has to be a java identifyer'. Because it's a boolean it should probably be 'true' or 'false' but both don't work.
What seems realy strange to me is that when I use this constructor in my code it perfectly works.
If I use a constructor for this class without any parameters (Switch()) it also works (although this constructor calles the not working constructor).
So only if I try to create an instance of this one class using one of two specific constructors and create the instance manually (putting it into the world using the mouse) it doesn't work because 'true' or 'false' seem to be no java identifyers.
This problem is not realy game relevant because I still can use the default constructor for this class but it would be very interesting why the hell this only occours in this one case.
I realy don't get why this occours. May anyone else has got an idea.
Here is the code of the class:
<Code Omitted>