Please Help
I dont know what causes the problem everything seems fine
10 Replies
** Exception Text **
System.NullReferenceException: Object reference not set to an instance of an object.
at BattleOfBritain.GameScreen.EnemiesProjectileTimer_Tick(Object sender, EventArgs e) in C:\C#\BattleOfBritain\Form1.cs:line 354
at System.Windows.Forms.Timer.OnTick(EventArgs e)
at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Something is null. Check everything you're accessing in that method
enemiesProjectile
, enemiesProjectile[i]
, enemies
, etc. and see which it is$debug
Tutorial: Debug C# code and inspect data - Visual Studio (Windows)
Learn features of the Visual Studio debugger and how to start the debugger, step through code, and inspect data in a C# application.
nope, couldnt make it work, I guess I will dump the whole code even chatgpt couldnt fix it
Unknown User•12mo ago
Message Not Public
Sign In & Join Server To View
I was very short on sleep yesterday, thank you for your help. When I debug the code VS showed the problem Im pretty beginner, sorry
Unknown User•12mo ago
Message Not Public
Sign In & Join Server To View
When I saw snowgirl said debug, I thought “damn I’m already debugging, why he/she wrote that”. However I wasn’t, pretty shocking right