Game Development Community

Space Warrior tutorial problems

by matthew allen · in Torque X 2D · 02/24/2009 (1:00 pm) · 5 replies

i get this error on the Space Warrior Tutorial Error 5 'GarageGames.Torque.ShipControlsComponent._OnRegister(GarageGames.Torque.Core.TorqueObject)': cannot change access modifiers when overriding 'protected internal' inherited member 138 33 Torque

#1
02/24/2009 (1:04 pm)
Sounds like your _onRegister method is not set up correctly in the shipcontrols component.

Access modifiers are like public, protected, private, etc..

Make sure the method is set up like this in your component:

protected override bool _OnRegister(TorqueObject owner)
#2
02/24/2009 (1:11 pm)
it is exactly like that all my methods in the "Private, protected, internal methods" region have the same error...maybe i should just not do this tutorial
#3
02/24/2009 (3:45 pm)
paste your _onRegister code that is getting the error

also don't make 2 posts on the same thing...
#4
02/24/2009 (3:46 pm)
Try this:

remove the method, then go to an empty line within your class. Start typing: override and choose the method you need. Visual Studio should generate the correct method definition including the access modifier.

Also, note that the "internal" modifier means the method is visible within the same assembly only.
#5
02/24/2009 (8:31 pm)
thanks Thijs that worked