Original Post
(This is a extremly simplified version of my last post) Im trying to read from a file into a display list and I'm gettign a runtime error. When I debug it points out this section of code: [/source] sector1.quad[loop_m].vertex[0] Error : Expression cannot be evaulated. It point this out for all 5 times. Its also give an error on x_m, but no info as to why. Any insight as to why it cant be evaluated. If you need all the code its in my first post which people understandable hated: http://muer.njoerdba.com/paste/view.aspx?id=d09bcb82-32ad-4faa-8fda-b8f95d19212c Thx, Matt [Edited by - Hola on November 5, 2004 10:34:38 PM]
[SOURCE]
GLvoid BuildLists() // Make A BuildList
{
astr=glGenLists(2);
glNewList(astr,GL_COMPILE);
GLfloat x_m, y_m, z_m, u_m, v_m;
int numquads;
numquads = sector1.numquads;
for (int loop_m = 0; loop_m < numquads; loop_m++) // Read BuildList From File
{
glBegin(GL_QUADS);
glNormal3f ( 0.0f, 0.0f, 1.0f);
x_m = sector1.quad[loop_m].vertex[0].x;
y_m = sector1.quad[loop_m].vertex[0].y;
z_m = sector1.quad[loop_m].vertex[0].z;
u_m = sector1.quad[loop_m].vertex[0].u;
v_m = sector1.quad[loop_m].vertex[0].v;
glTexCoord2f(u_m, v_m);glVertex3f(x_m, y_m, z_m);
[/SOURCE]