   DevIL is giving me headaches...
  I can't get OpenIL to make textures in the NeHe texture tutorial. I've been trying to figure it out for the last 3 days... please help! Here is my code for texture loading... please tell me what I'm missing! All that happens when I run this code is that my cube appears with grey sides.int LoadGLTextures (){ilInit();iluInit();ilutRenderer(ILUT_OPENGL);ILuint ImgId;// The Image NameilGenImages(1, &ImgId);// Generate Image NameilBindImage(ImgId);// Bind Image Name to Be Currentif (ilLoadImage("Data/Eggs.bmp")){// Load the Bitmap and Check for ErrorsilDeleteImages(1, &ImgId);// If Could Not Load, Delete Imagereturn FALSE;//  and Return False}texture[0] = ilutGLBindTexImage();ilDeleteImages(1, &ImgId);return true;}//There's some stuff here... but it's not important.//Then in DrawGLScene, there's this line...glBindTexture(GL_TEXTURE_2D, texture[0]);//And that's all I have about textures.[Edited by - EmrldDrgn on July 26, 2006 6:19:49 PM]
  I don't think you're supposed to call ilDeleteImages(1, &ImgId) in loadGLTextures(). This would just delete the texture you're trying to use.Why can't you just use: texture[0] = ImgId;Since ilLoadImage returns a boolean value, should not the check for a failed imageload be:if (!ilLoadImage("Data/Eggs.bmp")){...//LoadImage failed}Make sure to call glEnable(GL_TEXTURE_2D);.Make sure the texture coordinates are correct.Good Luck.   ;  I think that the problem is, I'm not initializing ILUT correctly. I don't know exactly how to do it, but I think the problem is definitly with ilutGlBindTexImage();.Anyone who uses DevIL, can you help me to initialize ILUT? I've looked at the documentation, but I still can't figure it out.   ;  Perhaps this will work:void InitDevIL(){  ilInit();  iluInit();  ilutRenderer(ILUT_OPENGL);  ilutInit();}void ShutDownDevIL(){  ilShutDown();}GLuint LoadGLTexture(const char* str){  return ilutGLLoadImage(str);}InitDevIL();GLuint id = LoadGLTexture("Data/Eggs.bmp");glBindTexture(GL_TEXTURE_2D,id);;  I tried that, and it just... won't... WORK! I cannot believe how long this is taking me to work out! I'm so annoyed, that I am just going to post the entire source file and ask if anyone could fix it. I know that that's "frowned upon" in the forum FAQ, but I am dying of frustration over here.#include <windows.h>// Header File For Windows#include <stdio.h>// Header File For Standard Input/Output#include <gl\gl.h>// Header File For The OpenGL32 Library#include <gl\glu.h>// Header File For The GLu32 Library#include <gl\glaux.h>// Header File For The Glaux Library#include <il\il.h>// Header File For OpenIL#include <il\ilu.h>// Header File For OpenILU#include <il\ilut.h>// Header File For OpenILUTHDChDC=NULL;// Private GDI Device ContextHGLRChRC=NULL;// Permanent Rendering ContextHWNDhWnd=NULL;// Holds Our Window HandleHINSTANCEhInstance;// Holds The Instance Of The Applicationboolkeys[256];// Array Used For The Keyboard Routineboolactive=TRUE;// Window Active Flag Set To TRUE By Defaultboolfullscreen=TRUE;// Fullscreen Flag Set To Fullscreen Mode By DefaultGLfloatxrot;// X Rotation ( NEW )GLfloatyrot;// Y Rotation ( NEW )GLfloatzrot;// Z Rotation ( NEW )GLuinttexture[1];// Storage For One Texture ( NEW )LRESULTCALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);// Declaration For WndProcint LoadGLTextures()// Load Bitmaps And Convert To Textures{ilInit();iluInit();ilutRenderer(ILUT_OPENGL);ilutInit();ILuint ImgId;// The Image NameilGenImages(1, &ImgId);// Generate Image NameilBindImage(ImgId);// Bind Image Name to Be Currentif (ilLoadImage("Data/Eggs.bmp")) {// Load the Bitmap and Check for ErrorsilDeleteImages(1, &ImgId);// If Could Not Load, Delete Imagereturn FALSE;//  and Return False}texture[0] = ilutGLBindTexImage();// Send the Image to OpenGLilDeleteImages(1, &ImgId);// Delete the Image Name, As GL Has a Copyreturn TRUE;// Return Success}GLvoid ReSizeGLScene(GLsizei width, GLsizei height)// Resize And Initialize The GL Window{if (height==0)// Prevent A Divide By Zero By{height=1;// Making Height Equal One}glViewport(0,0,width,height);// Reset The Current ViewportglMatrixMode(GL_PROJECTION);// Select The Projection MatrixglLoadIdentity();// Reset The Projection Matrix// Calculate The Aspect Ratio Of The WindowgluPerspective(45.0f,(GLfloat)width/(GLfloat)height,0.1f,100.0f);glMatrixMode(GL_MODELVIEW);// Select The Modelview MatrixglLoadIdentity();// Reset The Modelview Matrix}int InitGL(GLvoid)// All Setup For OpenGL Goes Here{if (!LoadGLTextures())// Jump To Texture Loading Routine ( NEW ){return FALSE;// If Texture Didn't Load Return FALSE}glEnable(GL_TEXTURE_2D);// Enable Texture Mapping ( NEW )glShadeModel(GL_SMOOTH);// Enable Smooth ShadingglClearColor(0.0f, 0.0f, 0.0f, 0.5f);// Black BackgroundglClearDepth(1.0f);// Depth Buffer SetupglEnable(GL_DEPTH_TEST);// Enables Depth TestingglDepthFunc(GL_LEQUAL);// The Type Of Depth Testing To DoglHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);// Really Nice Perspective Calculationsreturn TRUE;// Initialization Went OK}int DrawGLScene(GLvoid)// Here's Where We Do All The Drawing{glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);// Clear The Screen And The Depth BufferglLoadIdentity();// Reset The ViewglTranslatef(0.0f,0.0f,-5.0f);glRotatef(xrot,1.0f,0.0f,0.0f);glRotatef(yrot,0.0f,1.0f,0.0f);glRotatef(zrot,0.0f,0.0f,1.0f);glBindTexture(GL_TEXTURE_2D, texture[0]);glBegin(GL_QUADS);// Front FaceglTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f, -1.0f,  1.0f);glTexCoord2f(1.0f, 0.0f); glVertex3f( 1.0f, -1.0f,  1.0f);glTexCoord2f(1.0f, 1.0f); glVertex3f( 1.0f,  1.0f,  1.0f);glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f,  1.0f,  1.0f);// Back FaceglTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f);glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f,  1.0f, -1.0f);glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f,  1.0f, -1.0f);glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f, -1.0f, -1.0f);// Top FaceglTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f,  1.0f, -1.0f);glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f,  1.0f,  1.0f);glTexCoord2f(1.0f, 0.0f); glVertex3f( 1.0f,  1.0f,  1.0f);glTexCoord2f(1.0f, 1.0f); glVertex3f( 1.0f,  1.0f, -1.0f);// Bottom FaceglTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f, -1.0f, -1.0f);glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f, -1.0f, -1.0f);glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f, -1.0f,  1.0f);glTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f, -1.0f,  1.0f);// Right faceglTexCoord2f(1.0f, 0.0f); glVertex3f( 1.0f, -1.0f, -1.0f);glTexCoord2f(1.0f, 1.0f); glVertex3f( 1.0f,  1.0f, -1.0f);glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f,  1.0f,  1.0f);glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f, -1.0f,  1.0f);// Left FaceglTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f);glTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f, -1.0f,  1.0f);glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f,  1.0f,  1.0f);glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f,  1.0f, -1.0f);glEnd();xrot+=0.3f;yrot+=0.2f;zrot+=0.4f;return TRUE;// Keep Going}GLvoid KillGLWindow(GLvoid)// Properly Kill The Window{if (fullscreen)// Are We In Fullscreen Mode?{ChangeDisplaySettings(NULL,0);// If So Switch Back To The DesktopShowCursor(TRUE);// Show Mouse Pointer}if (hRC)// Do We Have A Rendering Context?{if (!wglMakeCurrent(NULL,NULL))// Are We Able To Release The DC And RC Contexts?{MessageBox(NULL,"Release Of DC And RC Failed.","SHUTDOWN ERROR",MB_OK | MB_ICONINFORMATION);}if (!wglDeleteContext(hRC))// Are We Able To Delete The RC?{MessageBox(NULL,"Release Rendering Context Failed.","SHUTDOWN ERROR",MB_OK | MB_ICONINFORMATION);}hRC=NULL;// Set RC To NULL}if (hDC && !ReleaseDC(hWnd,hDC))// Are We Able To Release The DC{MessageBox(NULL,"Release Device Context Failed.","SHUTDOWN ERROR",MB_OK | MB_ICONINFORMATION);hDC=NULL;// Set DC To NULL}if (hWnd && !DestroyWindow(hWnd))// Are We Able To Destroy The Window?{MessageBox(NULL,"Could Not Release hWnd.","SHUTDOWN ERROR",MB_OK | MB_ICONINFORMATION);hWnd=NULL;// Set hWnd To NULL}if (!UnregisterClass("OpenGL",hInstance))// Are We Able To Unregister Class{MessageBox(NULL,"Could Not Unregister Class.","SHUTDOWN ERROR",MB_OK | MB_ICONINFORMATION);hInstance=NULL;// Set hInstance To NULL}} BOOL CreateGLWindow(char* title, int width, int height, int bits, bool fullscreenflag){GLuintPixelFormat;// Holds The Results After Searching For A MatchWNDCLASSwc;// Windows Class StructureDWORDdwExStyle;// Window Extended StyleDWORDdwStyle;// Window StyleRECTWindowRect;// Grabs Rectangle Upper Left / Lower Right ValuesWindowRect.left=(long)0;// Set Left Value To 0WindowRect.right=(long)width;// Set Right Value To Requested WidthWindowRect.top=(long)0;// Set Top Value To 0WindowRect.bottom=(long)height;// Set Bottom Value To Requested Heightfullscreen=fullscreenflag;// Set The Global Fullscreen FlaghInstance= GetModuleHandle(NULL);// Grab An Instance For Our Windowwc.style= CS_HREDRAW | CS_VREDRAW | CS_OWNDC;// Redraw On Size, And Own DC For Window.wc.lpfnWndProc= (WNDPROC) WndProc;// WndProc Handles Messageswc.cbClsExtra= 0;// No Extra Window Datawc.cbWndExtra= 0;// No Extra Window Datawc.hInstance= hInstance;// Set The Instancewc.hIcon= LoadIcon(NULL, IDI_WINLOGO);// Load The Default Iconwc.hCursor= LoadCursor(NULL, IDC_ARROW);// Load The Arrow Pointerwc.hbrBackground= NULL;// No Background Required For GLwc.lpszMenuName= NULL;// We Don't Want A Menuwc.lpszClassName= "OpenGL";// Set The Class Nameif (!RegisterClass(&wc))// Attempt To Register The Window Class{MessageBox(NULL,"Failed To Register The Window Class.","ERROR",MB_OK|MB_ICONEXCLAMATION);return FALSE;// Return FALSE}if (fullscreen)// Attempt Fullscreen Mode?{DEVMODE dmScreenSettings;// Device Modememset(&dmScreenSettings,0,sizeof(dmScreenSettings));// Makes Sure Memory's CleareddmScreenSettings.dmSize=sizeof(dmScreenSettings);// Size Of The Devmode StructuredmScreenSettings.dmPelsWidth= width;// Selected Screen WidthdmScreenSettings.dmPelsHeight= height;// Selected Screen HeightdmScreenSettings.dmBitsPerPel= bits;// Selected Bits Per PixeldmScreenSettings.dmFields=DM_BITSPERPEL|DM_PELSWIDTH|DM_PELSHEIGHT;// Try To Set Selected Mode And Get Results.  NOTE: CDS_FULLSCREEN Gets Rid Of Start Bar.if (ChangeDisplaySettings(&dmScreenSettings,CDS_FULLSCREEN)!=DISP_CHANGE_SUCCESSFUL){// If The Mode Fails, Offer Two Options.  Quit Or Use Windowed Mode.if (MessageBox(NULL,"The Requested Fullscreen Mode Is Not Supported By\nYour Video Card. Use Windowed Mode Instead?","NeHe GL",MB_YESNO|MB_ICONEXCLAMATION)==IDYES){fullscreen=FALSE;// Windowed Mode Selected.  Fullscreen = FALSE}else{// Pop Up A Message Box Letting User Know The Program Is Closing.MessageBox(NULL,"Program Will Now Close.","ERROR",MB_OK|MB_ICONSTOP);return FALSE;// Return FALSE}}}if (fullscreen)// Are We Still In Fullscreen Mode?{dwExStyle=WS_EX_APPWINDOW;// Window Extended StyledwStyle=WS_POPUP;// Windows StyleShowCursor(FALSE);// Hide Mouse Pointer}else{dwExStyle=WS_EX_APPWINDOW | WS_EX_WINDOWEDGE;// Window Extended StyledwStyle=WS_OVERLAPPEDWINDOW;// Windows Style}AdjustWindowRectEx(&WindowRect, dwStyle, FALSE, dwExStyle);// Adjust Window To True Requested Size// Create The Windowif (!(hWnd=CreateWindowEx(dwExStyle,// Extended Style For The Window"OpenGL",// Class Nametitle,// Window TitledwStyle |// Defined Window StyleWS_CLIPSIBLINGS |// Required Window StyleWS_CLIPCHILDREN,// Required Window Style0, 0,// Window PositionWindowRect.right-WindowRect.left,// Calculate Window WidthWindowRect.bottom-WindowRect.top,// Calculate Window HeightNULL,// No Parent WindowNULL,// No MenuhInstance,// InstanceNULL)))// Dont Pass Anything To WM_CREATE{KillGLWindow();// Reset The DisplayMessageBox(NULL,"Window Creation Error.","ERROR",MB_OK|MB_ICONEXCLAMATION);return FALSE;// Return FALSE}staticPIXELFORMATDESCRIPTOR pfd=// pfd Tells Windows How We Want Things To Be{sizeof(PIXELFORMATDESCRIPTOR),// Size Of This Pixel Format Descriptor1,// Version NumberPFD_DRAW_TO_WINDOW |// Format Must Support WindowPFD_SUPPORT_OPENGL |// Format Must Support OpenGLPFD_DOUBLEBUFFER,// Must Support Double BufferingPFD_TYPE_RGBA,// Request An RGBA Formatbits,// Select Our Color Depth0, 0, 0, 0, 0, 0,// Color Bits Ignored0,// No Alpha Buffer0,// Shift Bit Ignored0,// No Accumulation Buffer0, 0, 0, 0,// Accumulation Bits Ignored16,// 16Bit Z-Buffer (Depth Buffer)  0,// No Stencil Buffer0,// No Auxiliary BufferPFD_MAIN_PLANE,// Main Drawing Layer0,// Reserved0, 0, 0// Layer Masks Ignored};if (!(hDC=GetDC(hWnd)))// Did We Get A Device Context?{KillGLWindow();// Reset The DisplayMessageBox(NULL,"Can't Create A GL Device Context.","ERROR",MB_OK|MB_ICONEXCLAMATION);return FALSE;// Return FALSE}if (!(PixelFormat=ChoosePixelFormat(hDC,&pfd)))// Did Windows Find A Matching Pixel Format?{KillGLWindow();// Reset The DisplayMessageBox(NULL,"Can't Find A Suitable PixelFormat.","ERROR",MB_OK|MB_ICONEXCLAMATION);return FALSE;// Return FALSE}if(!SetPixelFormat(hDC,PixelFormat,&pfd))// Are We Able To Set The Pixel Format?{KillGLWindow();// Reset The DisplayMessageBox(NULL,"Can't Set The PixelFormat.","ERROR",MB_OK|MB_ICONEXCLAMATION);return FALSE;// Return FALSE}if (!(hRC=wglCreateContext(hDC)))// Are We Able To Get A Rendering Context?{KillGLWindow();// Reset The DisplayMessageBox(NULL,"Can't Create A GL Rendering Context.","ERROR",MB_OK|MB_ICONEXCLAMATION);return FALSE;// Return FALSE}if(!wglMakeCurrent(hDC,hRC))// Try To Activate The Rendering Context{KillGLWindow();// Reset The DisplayMessageBox(NULL,"Can't Activate The GL Rendering Context.","ERROR",MB_OK|MB_ICONEXCLAMATION);return FALSE;// Return FALSE}ShowWindow(hWnd,SW_SHOW);// Show The WindowSetForegroundWindow(hWnd);// Slightly Higher PrioritySetFocus(hWnd);// Sets Keyboard Focus To The WindowReSizeGLScene(width, height);// Set Up Our Perspective GL Screenif (!InitGL())// Initialize Our Newly Created GL Window{KillGLWindow();// Reset The DisplayMessageBox(NULL,"Initialization Failed.","ERROR",MB_OK|MB_ICONEXCLAMATION);return FALSE;// Return FALSE}return TRUE;// Success}LRESULT CALLBACK WndProc(HWNDhWnd,// Handle For This WindowUINTuMsg,// Message For This WindowWPARAMwParam,// Additional Message InformationLPARAMlParam)// Additional Message Information{switch (uMsg)// Check For Windows Messages{case WM_ACTIVATE:// Watch For Window Activate Message{if (!HIWORD(wParam))// Check Minimization State{active=TRUE;// Program Is Active}else{active=FALSE;// Program Is No Longer Active}return 0;// Return To The Message Loop}case WM_SYSCOMMAND:// Intercept System Commands{switch (wParam)// Check System Calls{case SC_SCREENSAVE:// Screensaver Trying To Start?case SC_MONITORPOWER:// Monitor Trying To Enter Powersave?return 0;// Prevent From Happening}break;// Exit}case WM_CLOSE:// Did We Receive A Close Message?{PostQuitMessage(0);// Send A Quit Messagereturn 0;// Jump Back}case WM_KEYDOWN:// Is A Key Being Held Down?{keys[wParam] = TRUE;// If So, Mark It As TRUEreturn 0;// Jump Back}case WM_KEYUP:// Has A Key Been Released?{keys[wParam] = FALSE;// If So, Mark It As FALSEreturn 0;// Jump Back}case WM_SIZE:// Resize The OpenGL Window{ReSizeGLScene(LOWORD(lParam),HIWORD(lParam));  // LoWord=Width, HiWord=Heightreturn 0;// Jump Back}}// Pass All Unhandled Messages To DefWindowProcreturn DefWindowProc(hWnd,uMsg,wParam,lParam);}int WINAPI WinMain(HINSTANCEhInstance,// InstanceHINSTANCEhPrevInstance,// Previous InstanceLPSTRlpCmdLine,// Command Line ParametersintnCmdShow)// Window Show State{MSGmsg;// Windows Message StructureBOOLdone=FALSE;// Bool Variable To Exit Loop// Ask The User Which Screen Mode They Preferif (MessageBox(NULL,"Would You Like To Run In Fullscreen Mode?", "Start FullScreen?",MB_YESNO|MB_ICONQUESTION)==IDNO){fullscreen=FALSE;// Windowed Mode}// Create Our OpenGL Windowif (!CreateGLWindow("NeHe's Texture Mapping Tutorial",640,480,16,fullscreen)){return 0;// Quit If Window Was Not Created}while(!done)// Loop That Runs While done=FALSE{if (PeekMessage(&msg,NULL,0,0,PM_REMOVE))// Is There A Message Waiting?{if (msg.message==WM_QUIT)// Have We Received A Quit Message?{done=TRUE;// If So done=TRUE}else// If Not, Deal With Window Messages{TranslateMessage(&msg);// Translate The MessageDispatchMessage(&msg);// Dispatch The Message}}else// If There Are No Messages{// Draw The Scene.  Watch For ESC Key And Quit Messages From DrawGLScene()if ((active && !DrawGLScene()) || keys[VK_ESCAPE])// Active?  Was There A Quit Received?{done=TRUE;// ESC or DrawGLScene Signalled A Quit}else// Not Time To Quit, Update Screen{SwapBuffers(hDC);// Swap Buffers (Double Buffering)}if (keys[VK_F1])// Is F1 Being Pressed?{keys[VK_F1]=FALSE;// If So Make Key FALSEKillGLWindow();// Kill Our Current Windowfullscreen=!fullscreen;// Toggle Fullscreen / Windowed Mode// Recreate Our OpenGL Windowif (!CreateGLWindow("NeHe's Texture Mapping Tutorial",640,480,16,fullscreen)){return 0;// Quit If Window Was Not Created}}}}// ShutdownKillGLWindow();// Kill The Windowreturn (msg.wParam);// Exit The Program}I know... I'm not supposed to do this, and you are under no obligation to actually read this code. But if you would, I would really, REALLY appreciate it. TIA.   ;  I don't understand what your problem is. That code that you are posting works fine if you use the code I posted before.In your code, replace the function LoadGLTextures with this:int LoadGLTextures(){  ilInit();  iluInit();  ilutRenderer(ILUT_OPENGL);  ilutInit();  texture[0] = ilutGLLoadImage("Data/Eggs.bmp");  return TRUE;}I have compiled it and it rendered a cube with the texture. What errors are you getting?   ;  I wasn't getting any errors, that's what was bugging me. It's fixed now. The code you just posted works, but only if  I go into the debug directory of my project and run the EXE compiled from the code, not if I just hit F5 to run in debug mode. I'm not sure why that is, but it works! That's all that matters. Thanks a ton for all your help and patience with my idiocy.   ;  I'm back, and I need a little more help. I'm trying to generalize my texture loading functions, and I tried to change it so that it took a parameter and returned a GLuint, like so:GLuint GLLoadTexture (std::string loader){  texture = ilutGLLoadImage("Data/" + loader + ".bmp");   return texture;}but I get an error (cannot convert std::string to const ILstring). I tried to get around this in the following ways:Make the function take a const char *.Make the std::string const.Make the function take an ILstring.The char * and ILstring gave me "cannot add two pointers", the const string gave the same as a normal string. How can I fix this problem? It seems like ILstring doesn't define a + operator to operate with strings, but that seems shortsighted at best. Some help, please?PS sorry for the double post but editing doesn't move it up the page... and that's kind of a long post for an edit.   ;Quote:Original post by EmrldDrgnI'm back, and I need a little more help. I'm trying to generalize my texture loading functions, and I tried to change it so that it took a parameter and returned a GLuint, like so:GLuint GLLoadTexture (std::string loader){  texture = ilutGLLoadImage("Data/" + loader + ".bmp");   return texture;}but I get an error (cannot convert std::string to const ILstring). I tried to get around this in the following ways:Make the function take a const char *.Make the std::string const.Make the function take an ILstring.The char * and ILstring gave me "cannot add two pointers", the const string gave the same as a normal string. How can I fix this problem? It seems like ILstring doesn't define a + operator to operate with strings, but that seems shortsighted at best. Some help, please?PS sorry for the double post but editing doesn't move it up the page... and that's kind of a long post for an edit.can you post the code for ilutGLLoadImage? because i'm looking on the DevIL and I see no such function. also most loading functions, especially those based OGL, which is based in C, AFAIK, are gonna take a C-string as opposed to a C++ string.;  Ummm... no, no I can't, mostly because I don't know where I can find it. It's not a function I programmed. However, I've changed my idea to a slightly less easy to use and slightly easier to program one, where my function simply takes an ILstring and is not added to anything.I'm now getting very wierd errors... all from this bit of code:*(map[y][x].front().tile) -> image = loader;map is a two-dimentional array of lists of map_tiles (a struct). front returns the first item in the list, tile is a pointer to a struct named tile_struct.Loader is of type ILstring, and so is image, which is defined in tile_struct.However, when I try to compile this code, I get this error: cannot convert from ILstring to char. This means that it thinks image is a char, right? Image used to be a char, but I modified the parameter to be an ILstring. Why am I getting this error? It seems like the compiler is lagging behind what I've actually coded, but I don't understand how this is possible, or how I might fix it. I also tried changing the ILstring parameter to a char, just to see what would happen, and I got the same error, with an additional one:illegal indirection.[Edited by - EmrldDrgn on July 27, 2006 1:37:52 AM]