Errors in Blaster Tutorial
by Zilla · in Torque X 2D · 07/07/2007 (5:59 am) · 4 replies
I was following the Blaster Tutorial step by step but I get several build errors. The first one when I inserted
float TargetX = Game.GameInstance.Player.Position.X;
but other errors followed...
Is there the a completed version available, so that I can compare my c# files with the correct ones?
float TargetX = Game.GameInstance.Player.Position.X;
but other errors followed...
Is there the a completed version available, so that I can compare my c# files with the correct ones?
#2
float TargetX = Game.GameInstance.Player.Position.X;
Error:
'StarterGame.Game' does not contain a definition for 'GameInstance'
Game.cs Line 65:
if (ourObject == Game.Instance.Player)
Error:
'StarterGame.Game' does not contain a definition for 'Player'
07/07/2007 (12:05 pm)
EnemyAIComponent.cs Line 83:float TargetX = Game.GameInstance.Player.Position.X;
Error:
'StarterGame.Game' does not contain a definition for 'GameInstance'
Game.cs Line 65:
if (ourObject == Game.Instance.Player)
Error:
'StarterGame.Game' does not contain a definition for 'Player'
#3
07/07/2007 (12:42 pm)
Do you have properties defined for GameInstance and Player in the "Public properties, operators, constants, and enums" region of Game.cs? In the tutorial they're in the second code block of part 2.
#4
This is it! I checked everything three times but I must have missed this...
I discovered Torque and Torque X two days ago and I am so excited about it, that I have spent to much time in front of the computer. Now everything is fine and I can go to bed...
07/07/2007 (2:23 pm)
Thank you, Dan!This is it! I checked everything three times but I must have missed this...
I discovered Torque and Torque X two days ago and I am so excited about it, that I have spent to much time in front of the computer. Now everything is fine and I can go to bed...
Torque Owner Dan Maruschak