DevIL is giving me headaches...

Started by
12 comments, last by EmrldDrgn 17 years, 9 months ago
I believe that ILstring is actually a typedef'd char*. your immediate problem is that long piece of code is being evaluated a char as opposed to a char*. try just this: (map[y][x].front().tile) ->image = loader;

edit: try it with and without the parentheses.

Beginner in Game Development?  Read here. And read here.

 

Advertisement
That works, and the code compiles, but I get an "assertion" error when I try to run the program. I don't know what causes this, only that the code which displays it is buried deep in the bowels of the list header. It then says "List iterator not derefrencable". I'm currently looking through the help on assertions, as is suggested by the error message, but I'm really not understanding what's going wrong.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~I program in C++, on MSVC++ '05 Express, and on Windows. Most of my programs are also for windows.
post the map and tile codes. it could be the way you are dereferencing the map variables. also is the item in the list a pointer? if it is you'll have to change it to: map[y][x].front()->tile->image = loader;

Beginner in Game Development?  Read here. And read here.

 

As usual, I was just being an idiot. Apparently that's the error that it gives you when you don't have anything in a list and try to use front. I had forgotten to call my wonderful InitList function I spent most of today writing, so all my lists were empty. I fixed it up, and my code now works. Thanks for all your help, everyone. Now I just have to get the movement code hammered out and I'll have a working demo... in theory. Thanks again for everything.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~I program in C++, on MSVC++ '05 Express, and on Windows. Most of my programs are also for windows.

This topic is closed to new replies.

Advertisement