Scrolling Game Development Kit Forum

SGDK Version 2 => Help, Errors, FAQ => Topic started by: Jam0864 on 2007-03-07, 12:57:43 AM

Title: Object reference not set to an instance of an object.
Post by: Jam0864 on 2007-03-07, 12:57:43 AM
I'm not sure if I stuffed something up while making my project, or alpha 2 is the reason it's stuffing up. I just got alpha 2 from alpha 1. Project used to run in alpha 1, although i edited some things i didn't test before I got alpha 2 so it's possible I stuffed it up without relising it. Hope you could understand that, it was a mouthful, anyway, here's the error from the log viewer.

Test Project\Frameset.cs(218,56) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\MapBase.cs(57,17) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\MapBase.cs(63,17) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\MapBase.cs(142,39) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\LayerBase.cs(71,80) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\GeneralRules.cs(23,7) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\GeneralRules.cs(30,7) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\GeneralRules.cs(36,28) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\GeneralRules.cs(38,10) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\GeneralRules.cs(39,8) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\GeneralRules.cs(45,28) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\GeneralRules.cs(49,39) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\GeneralRules.cs(50,7) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\GeneralRules.cs(56,14) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\GeneralRules.cs(62,7) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\GeneralRules.cs(74,29) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\GeneralRules.cs(89,39) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\GeneralRules.cs(92,38) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\GeneralRules.cs(136,11) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\GeneralRules.cs(142,35) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\GeneralRules.cs(201,16) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\GeneralRules.cs(204,19) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\GeneralRules.cs(207,13) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\GeneralRules.cs(209,13) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\GeneralRules.cs(211,13) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\GeneralRules.cs(264,7) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\GeneralRules.cs(270,7) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\GeneralRules.cs(286,10) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\GeneralRules.cs(288,10) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\GeneralRules.cs(300,7) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\GeneralRules.cs(306,7) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\GeneralRules.cs(312,14) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\PlanBase.cs(290,26) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\PlanBase.cs(296,24) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\Controls.cs(49,11) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\Controls.cs(56,26) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\Controls.cs(57,34) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\Controls.cs(60,25) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\Controls.cs(405,13) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\Controls.cs(407,13) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\Controls.cs(426,20) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\Controls.cs(432,47) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\Controls.cs(454,29) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\Controls.cs(464,11) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\Controls.cs(466,50) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\Controls.cs(480,42) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\Display.cs(306,33) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\Display.cs(622,14) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\GameForm.cs(54,43) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\GameForm.cs(150,41) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\GameForm.cs(152,40) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\GameForm.cs(153,68) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\About.cs(30,25) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\CollisionMask.cs(167,48) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\SpriteBase.cs(713,28) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\SpriteBase.cs(720,26) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\SpriteBase.cs(725,24) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\Player.cs(132,17) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\Player.cs(140,17) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\Player.cs(148,17) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\Player.cs(156,17) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\Player.cs(164,17) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\Player.cs(172,17) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\Player.cs(180,17) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\Player.cs(188,17) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\Player.cs(214,17) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\Player.cs(222,17) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\Player.cs(230,17) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\Player.cs(238,17) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\Player.cs(246,17) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\Player.cs(254,17) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\Player.cs(262,17) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)
Test Project\Player.cs(270,17) : error CS0246: The type or namespace name 'Project' could not be found (are you missing a using directive or an assembly reference?)


It appears I'm somehow missing all the source code from my project, lol.  ;D  I'm just glad I was able to copy and paste, I would never type all that out.   ;)
Title: Re: Object reference not set to an instance of an object.
Post by: bluemonkmn on 2007-03-07, 06:37:22 AM
Select "Reset Source Code" from the File menu.  This will replace all pre-defined source code files in the project (the ones that have an icon that looks like a page of text, not the ones with question marks) with the new version from alpha 2.  Then try compiling the project.  If that works, then save your project.  Don't do this if you have put a lot of work into customizing the source code, because it will be replaced.

Details:
Compiling an SGDK2 project includes 3 kinds of source code files: 1. Customizable source code (shows up in the Source Code folder as a sheet with text); 2. User-defined source code (shows up in the Source Code folder as a sheet with a question mark) and 3. Generated source code (does not show up in the Source Code folder).  Alpha release 1 was treating Project.cs as Generated source code.  So when alpha release 1 creates a new project for you, it doesn't put a Project.cs in the project because that would conflict with the generated file.  Alpha 2 converted changed to treat Project.cs as a customizable file.  That means it no longer generates this file; it expects it to be in the project.  Since SGDK2 only adds files to the project when you ask it to (when a new project is created or when you select Reset Source Code), your alpha 1 project loaded as-is without Project.cs.  Since alpha 2 was no longer generating this file, all your error messages about "Project" were complaining about the missing Project.cs file.  When you select "Reset Source Code", it tells SGDK2 to reset all the customizable code objects to what it expects to see in a new project.  So, among other things, that will add Project.cs to your project.

After you make this change, it's possible some of your rules might cause errors.  I may have changed the number of parameters on some rules you might have been using, and after you reset the source code, it might complain about the wrong number of parameters being used in some of your rules.  But if that happens, it should be relatively easy to fix the rules if you can find where they're being used (in the Sprite Definition Rules tab or the Plan Rules).
Title: Re: Object reference not set to an instance of an object.
Post by: Jam0864 on 2007-03-08, 12:31:53 AM
I can now compile it but still not run it. I get, http://www.box.net/public/psi31f5osd  Sorry can't be stuffed typing it.

Title: Re: Object reference not set to an instance of an object.
Post by: bluemonkmn on 2007-03-08, 07:09:32 AM
Oops.  I neglected to properly handle spaces in map names in the new project.cs.  To fix it, open your project, open the SourceCode folder, open Project.cs and search for "_StartupMapType".  After the ")" that comes after that add .Replace(" ","_"). (There's a space between the first pair of double-quotes and an underscore in the second -- this replaces spaces with underscores.)  Then do the same for "_OverlayMapType". So you should have a couple expressions that looks like this:
Code: [Select]
... m_res.GetString("_StartupMapType").Replace(" ","_") + "_Map" ...
... m_res.GetString("_OverlayMapType").Replace(" ","_") + "_Map" ...

That should fix your problem.
Title: Re: Object reference not set to an instance of an object.
Post by: Jam0864 on 2007-03-09, 12:29:13 AM
Now i get,

Code: [Select]
Test Project\Project.cs(53,14) : error CS0131: The left-hand side of an assignment must be a variable, property or indexer
Test Project\Project.cs(53,14) : error CS0029: Cannot implicitly convert type 'string' to 'bool'
Title: Re: Object reference not set to an instance of an object.
Post by: bluemonkmn on 2007-03-09, 06:54:39 AM
Show me the two lines of Project.cs that you edited.
Title: Re: Object reference not set to an instance of an object.
Post by: Jam0864 on 2007-03-09, 03:42:56 PM
Here you go,

Code: [Select]
overlayMapType = System.Reflection.Assembly.GetExecutingAssembly().GetType(m_res.GetString("_OverlayMapType").Replace(" ","_") + "_Map", true);

System.Type startupMapType = System.Reflection.Assembly.GetExecutingAssembly().GetType(m_res.GetString("_StartupMapType").Replace(" ","_") + "_Map", true);
Title: Re: Object reference not set to an instance of an object.
Post by: durnurd on 2007-03-09, 04:20:08 PM
open Project.cs and press [CTRL]+G and type in 53 and hit enter.  This will take you to line 53, where the error occurred.  My line 53 looks like this:

if (m_res.GetString("_OverlayMapType") != null)

What does yours look like?
Title: Re: Object reference not set to an instance of an object.
Post by: Jam0864 on 2007-03-09, 04:24:32 PM
Mine is slightly different,

Code: [Select]
if (m_res.GetString("_OverlayMapType")= null)
But if I fix mine to make it the same as yours I just get another error.
http://www.box.net/public/ulzuvs0yp6
Title: Re: Object reference not set to an instance of an object.
Post by: durnurd on 2007-03-09, 05:51:20 PM
Well, that was the solution.  You seem to have accidentally removed the "!" in that line.

The new error means you are getting further along the line.  Do you have DirectX 9 installed?  Are there DirectX files in the same directory as SGDK2?
Title: Re: Object reference not set to an instance of an object.
Post by: Jam0864 on 2007-03-09, 06:40:43 PM
Yes, got directX 9 from Counter-Strike.Yes there is 4 directX files in the SGDK2 directory. There is,

Microsoft.DirectX.Direct3D.dll
Microsoft.DirectX.Direct3DX.dll
Microsoft.DirectX.DirectInput.dll
Microsoft.DirectX.dll

I'm not sure if d3dx9_30.dll is a directX file, if it is I have 5 directX files. I had the same error when I first installed alpha 1. I can't remember the solution but it's somewhere in this forum.
Title: Re: Object reference not set to an instance of an object.
Post by: Jam0864 on 2007-03-11, 04:26:04 AM
Ok, tried the solution that worked with alpha 1. Doesn't work, doesn't change the error or anything.  :(
Title: Re: Object reference not set to an instance of an object.
Post by: bluemonkmn on 2007-03-11, 01:06:32 PM
Does the map editor work?

What versions of d3dx9_30.dll and Microsoft.DirectX.Direct3DX.dll do you have in the directory where SHFL.exe is?
Title: Re: Object reference not set to an instance of an object.
Post by: Jam0864 on 2007-03-11, 04:48:43 PM
Map editor works, but when I first open the project I get Object reference not set to an instance of an object, and I have to open it again for it to actually work. There is no file in the same directory as SHFL.exe, there is a folder in there though.
Title: Re: Object reference not set to an instance of an object.
Post by: bluemonkmn on 2007-03-12, 07:00:57 AM
There should be dozens of files in the same directory as SHFL.exe.  It's just SHFL.exe by itself?  If you copy the DirectX DLLs (including d3dx9_30.dll) from the parent directory into the directory where SHFL.exe is, does it change anything when you run SHFL.exe?
Title: Re: Object reference not set to an instance of an object.
Post by: Jam0864 on 2007-03-12, 03:13:36 PM
It says,
Cannot copy library:The destination folder is a subfolder of the source folder
Title: Re: Object reference not set to an instance of an object.
Post by: durnurd on 2007-03-12, 05:21:15 PM
You tried to copy too much.  Only copy the dll files, not the directory called "Library"
Title: Re: Object reference not set to an instance of an object.
Post by: sam on 2007-03-18, 02:00:14 PM
I got the same error...Finally got it fixed by only copying the "d3dx9_30.dll" file from SHFL folder to my Tutorial Proj. folder.
Title: Re: Object reference not set to an instance of an object.
Post by: sam on 2007-03-18, 02:37:48 PM
I managed to get through the tutorial finally (on my second attempt. No idea what I did wrong on first attempt).
My Tut Proj (http://geocities.com/pivot_stick/tut_proj.zip)
I learned a lot...
Just one question -- How do I make the stars on the inventory map transparent?

----
EDIT: If Geocities doesn't let you download the file (It wouldn't let me) remove te "us.share" from the beginning of the url, so it's just "http://geocities.com/...". Not sure why that's not working...
Title: Re: Object reference not set to an instance of an object.
Post by: bluemonkmn on 2007-03-18, 03:08:58 PM
If you want to make the stars on the inventory map transparent, create another tile mapping for tile index 4 in the tileset editor.  Delete the default triangle graphic from the tile and put just the star in without the blue background (like tile 2 had).  Then change the "Draw stars at top of screen" rule (this is in the "Draw Stars" plan in the "Inventory" layer).  Change the "2" (which references the star with the opaque background) to a "4" (which you just created without a background).

How much of the whole process did you understand?  Did it actually make sense or did you just follow the steps and accept it all as magic? :)  Is there anything you'd like to understand more about that you think could use some more comments in the tutorial?
Title: Re: Object reference not set to an instance of an object.
Post by: sam on 2007-03-18, 05:31:12 PM
Thanks.
Surprisingly I understood most of it all. The only thing I wasn't too sure about was the formulas in this:
Quote
Add another new rule named "Turn left"
Select "Do" from the first dropdown and "SwitchToState" from the second dropdown.
Type "(state + 1) % 72" in the "State" combo box.  This is the formula for calculating the next state number for turning left in a 72-state sprite.  Normally you could simply import a rotating sprite instead of having to know formulas, but this tutorial will show you all the details.
Select "RelativePosition.TopLeft" from the "Alignment" dropdown list.  This selection is really irrelavent because all states are the same size, so it's not important what you pick.
Check the "End If/End While" checkbox to end the first rule's condition.
Add a new rule named "If player is pressing right"
Select "If" from the first dropdown and "IsInputPressed" from the next dropdown.
Select "SpriteBase.InputBits.Right" from the "Input" dropdown list.
Select "false" from the "InitialOnly" dropdown list.
Add a new rule named "Turn right"
Select "Do" from the first dropdown and "SwitchToState" from the second dropdown.
Type "(72 + state - 1) % 72" in the "State" combo box.  This is the formula for calculating the next state for turning right.
Select "RelativePosition.TopLeft" from the "Alignment" dropdown list.
Check the "End If/End While" checkbox to end the "If player is pressing right" condition.
I don't understand how they work...
Title: Re: Object reference not set to an instance of an object.
Post by: durnurd on 2007-03-18, 06:16:14 PM
(state + 1)

This takes the number representing the current state, and adds 1 to it, since the number representing the state 5 degrees to the left is one greater than the current state, based on how the states were created.

Of course, if the number representing the current state is already at the max value of 71 (72 states, starting at 0), then you don't want it to keep increasing, you want it to move back over to 0.  So you use:

(state + 1) % 72

% is the modulus operator, which basically takes the remainder of the first argument divided by the second.  In essence, it makes sure the number stays less than the second operator.  For example:

5 % 72 = Remainder of 5/72.  Since 5/72 = 0r5, 5 % 72 == 5, so it has no effect for most cases.

Now, imagine state == 71.

(71 + 1) % 72 == 72 % 72 == Remainder of 72/72.  Since 72/72 = 1, and there is no remainder, then (71+1)%72 == 0.

The other direction is a bit trickier.

(72 + state - 1) % 72

This could be simplified as

(state - 1)

If only it would automatically wrap around when state == -1, but it doesn't.  So when it gets to -1, we have to reset it to 71.  There are two ways to do this: With an If statement, but this takes an extra command, or with modulo arithmetic:

Always adding 72 to a number before taking that number mod 72 is the same as doing nothing before taking that number mod 72.  Since 5/72 == 0r5, and (72 + 5)/72 == 77/72 == 1r5, we can see that the remainder is the same.  So by adding 72, we don't change the result in any case... except when state is 0:

(72 + state - 1) % 72 == (72 + 0 - 1) % 72 == 71 % 72 == 71.

The reason we have to add 72 first, is because -1 % 72 == -1.  Not useful.

So it automatically wraps back around when trying to turn to the right when you're already at state 0, and it automatically wraps back around when trying to turn to the left when you're already at state 71.
Title: Re: Object reference not set to an instance of an object.
Post by: Jam0864 on 2007-03-18, 11:15:50 PM
I now get,
Test Project\Project.cs(53,14) : error CS0131: The left-hand side of an assignment must be a variable, property or indexer
Test Project\Project.cs(53,14) : error CS0029: Cannot implicitly convert type 'string' to 'bool'
It's the same as one of the errors I was having earlier.
Title: Re: Object reference not set to an instance of an object.
Post by: bluemonkmn on 2007-03-19, 06:03:35 AM
I managed to get through the tutorial finally (on my second attempt. No idea what I did wrong on first attempt).
My Tut Proj (http://geocities.com/pivot_stick/tut_proj.zip)
I learned a lot...
Just one question -- How do I make the stars on the inventory map transparent?

----
EDIT: If Geocities doesn't let you download the file (It wouldn't let me) remove te "us.share" from the beginning of the url, so it's just "http://geocities.com/...". Not sure why that's not working...

FYI:
1) Geocities just doesn't like direct links to its files.  If you manually type the URL in the address bar it will download fine.
2) Unlike version 1.x, with SGDK2, you only need to distribute the .SGDK2 file to others that have SGDK2.  It contains all the game's code and data.  If you want to distribute your game to someone who doesn't have SGDK2, select "Delete Intermediate Files" from the file menu, then distribute everything left in the project folder (and not the .SGDK2 file).

Now... I'm looking at your tutorial project to see if it looks like mine.  I noticed that your star and triangle aren't using fancy gradient fills as described in the tutorial.  Why not?  I also notice they're pointing the wrong direction.  The triangle should be pointing straight up and the stars top point should be straight up (although that doesn't *really* matter).  I also noticed that you put the triangle before the star when it should have come after.  (Due to the way anti-aliased rotation works, the cell needs to not be next to any graphics that fill their cell because it will pick up pixels from them and I don't know how to prevent it.)

Do you know what could have happened to your project since it was last working that would have caused it to start having that error?  Are your overlay map and startup map settings still valid?  Maybe you can re-zip your project (just the SGDK2 file this time) and post it where the old one was and I can take look.

EDIT: attached is my version of the tutorial... ehmm... you can ignore the car, which I imported to remind me of my rotation formulas and then neglected to finish deleting.

EDIT 2: Try resetting the source code and re-applying the fixes to project.cs.  The error appears to be on line 53 of that file.  Or just check that line to see if anything looks obviously wrong.
Title: Re: Object reference not set to an instance of an object.
Post by: sam on 2007-03-19, 04:04:21 PM
Oo thanks...Curse you Geocities!!
I didn't pay too much attention to following graphics instructions because I had already done half the tutorial once and knew what was needed for the tut. So i just did them quickly, not realizing that there needed to be no tiles next to the tile being rotated. Also, as for the gradient fills I remember the first time I did the tutorial I couldn'nt get that right either so I just didn't bother this time.

EDIT: Downloaded your tutorial. It seems every time I make a project / download I always need to copy d3dx9_30.dll into the project files folder to get the game to run...
Title: Re: Object reference not set to an instance of an object.
Post by: bluemonkmn on 2007-03-19, 06:18:16 PM
1) What's happening when you try a gradient fill?  What exactly are you doing to try to make it work?

2) Until I release the next alpha, it will be necessary to manually copy d3dx9_30.dll into the generated project folder each time the contents of a project folder are cleared or created, unless your system has the same version of DirectX installed that SGDK2 uses, or later.  (Or you could just copy d3dx9_30.dll into your system32 folder yourself.)
Title: Re: Object reference not set to an instance of an object.
Post by: sam on 2007-03-19, 08:13:28 PM
1) Sorry don't remember I just didn't understand something and I haven't tried it again yet. I'll post when I do.
2) Ah heck, I'll just paste it into my system32 folder, thanks.
Title: Re: Object reference not set to an instance of an object.
Post by: Jam0864 on 2007-03-28, 01:08:14 AM
Just installed alpha 3!  ;D New error now,

Code: [Select]
Test Project\Lev_1_Map.cs(180,14) : error CS1501: No overload for method 'ByteLayer' takes '13' arguments
Test Project\Lev_1_Map.cs(211,14) : error CS1501: No overload for method 'ByteLayer' takes '13' arguments
Test Project\Lev_1_Map.cs(242,14) : error CS1501: No overload for method 'ByteLayer' takes '13' arguments
Test Project\Lev_1_Map.cs(273,14) : error CS1501: No overload for method 'ByteLayer' takes '13' arguments
Test Project\Lev_1_Map.cs(306,14) : error CS1501: No overload for method 'ByteLayer' takes '13' arguments
Test Project\Lev_1_Map.cs(373,14) : error CS1501: No overload for method 'ByteLayer' takes '13' arguments
Test Project\Project.cs(53,14) : error CS0131: The left-hand side of an assignment must be a variable, property or indexer
Test Project\Project.cs(53,14) : error CS0029: Cannot implicitly convert type 'string' to 'bool'
Title: Re: Object reference not set to an instance of an object.
Post by: bluemonkmn on 2007-03-28, 05:01:04 AM
New SGDK2 Release + Errors on old project => Reset the source code.
Title: Re: Object reference not set to an instance of an object.
Post by: Jam0864 on 2007-03-28, 11:52:53 PM
Thanks!  ;D   Finally got it working!  :) Hopefully I'll remember that for next time!  ;)  Now I'm going to do the tutorial!   8)