Growlith1223 Posted October 8, 2013 Author Share Posted October 8, 2013 So, Development on my Map Editor has gone smoothly EXCEPT for when i use Layer….![](http://eclipseorigins.com/community/filehost/a371863fbb887510587a11383fb1ff8a.png)Comes up with this shiz… Everything else works fine but once it 'tries' to read Map.Tile(X, Y).Layer(i)all hell breaks loose and errors pop up. That's really the only thing i have to fix and it's pretty much ready.I have tried using a Class, nope. Structure, nope. tried everything i could think of, nope.It's the only thing that's set to Nothing. it's the only thing i can't get a Tooltip from(the thing where in debug, you hover over and you get the value of it) it. If anyone can seriously help fix this, it would be GREATLY appreciated <3Sincerely,Growlith1223 Link to comment Share on other sites More sharing options...
RyokuHasu Posted October 8, 2013 Share Posted October 8, 2013 you are trying to use an object of a class when you don't have one made, that's what that means.' this here makes an object out of a classDim objectName as ClassNameobjectName = NEW ClassName(Parameters)you are missing this setup somewhere. Link to comment Share on other sites More sharing options...
Growlith1223 Posted October 8, 2013 Author Share Posted October 8, 2013 I already have it. hence Map. Link to comment Share on other sites More sharing options...
RyokuHasu Posted October 9, 2013 Share Posted October 9, 2013 it doesn't give that error just because it want's too, you are trying to use an object you dont have properly made somewhere. Link to comment Share on other sites More sharing options...
Growlith1223 Posted October 9, 2013 Author Share Posted October 9, 2013 [http://gyazo.com/fa62eca556e0501f99a80a0695d9af96](http://gyazo.com/fa62eca556e0501f99a80a0695d9af96)**It doesn't do anything** Link to comment Share on other sites More sharing options...
RyokuHasu Posted October 9, 2013 Share Posted October 9, 2013 Then give the line it errors on. Link to comment Share on other sites More sharing options...
Ertzel Posted October 9, 2013 Share Posted October 9, 2013 Can you post your code showing the where this error is happening? Link to comment Share on other sites More sharing options...
Growlith1223 Posted October 9, 2013 Author Share Posted October 9, 2013 ```G.DrawImage(Tex_Tileset(1), Map.tile(X + 1, Y + 1).Layer(i).x, Map.tile(X + 1, Y + 1).Layer(i).y)```just gonna say that it has nothing to do with this specific line. it's any line that has Map.Tile(X, Y).Layer(i) Link to comment Share on other sites More sharing options...
pandacoder Posted October 9, 2013 Share Posted October 9, 2013 Then Map.Tile or Tile.Layer is null, and you are trying to access members of a null object. Link to comment Share on other sites More sharing options...
RyokuHasu Posted October 9, 2013 Share Posted October 9, 2013 Well until you can be more specific I'm going to tell you the same thing, The error means SOMETHING hasn't been properly made into an object. It may not be your map, but it's SOMETHING.That's all I can say until you print a stack trace or give better debugging information.```Try Your code hereCatch exception as NullRefrenceException exception.PrintStackTrace() ' or similar debugging statmentEnd Try``` Link to comment Share on other sites More sharing options...
Growlith1223 Posted October 9, 2013 Author Share Posted October 9, 2013 i have already fixed it with the help of Ertzel, no need for anymore help. Link to comment Share on other sites More sharing options...
Ertzel Posted October 9, 2013 Share Posted October 9, 2013 For anyone wondering, this was the fix for layers:``` Public Class TileRec Public Layer(MapLayers.Fringe2) As TileDataRec Public Type As Byte Public Data1 As Long Public Data2 As Long Public Data3 As Long Public DirBlock As Byte Sub New() For x As Byte = MapLayers.Ground To MapLayers.Fringe2 Me.Layer(x) = New TileDataRec Next End Sub End Class``` Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now