local function definitions are illegal.... WHY?

Started by
1 comment, last by Kernoel 22 years, 5 months ago
I'm just working on a Screensaver, and got almost everything finished... but evertime i add the following Code, I get the error: "error C2601: 'VerifyPassword' : local function definitions are illegal".... Why is this?? Please Help me!!! Heres the Code:
  
	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
	glLoadIdentity();
	gluLookAt(		0, 1.5f, 8,		0, 0.5f, 0,			0, 1, 0);
	glRotatef(g_RotateX, 0, 1.0f, 0);
	g_RotateX += g_RotationSpeed;
	for(int i = 0; i < g_3DModel.numOfObjects; i++)
	{
		if(g_3DModel.pObject.size() <= 0) break;
		t3DObject *pObject = &g_3DModel.pObject[i];
		if(pObject->bHasTexture) {
			glEnable(GL_TEXTURE_2D);
			glColor3ub(255, 255, 255);
			glBindTexture(GL_TEXTURE_2D, g_Texture[pObject->materialID]);
		} else {
			glDisable(GL_TEXTURE_2D);
			glColor3ub(255, 255, 255);
		}
		glBegin(g_ViewMode);
			for(int j = 0; j < pObject->numOfFaces; j++)
			{
				for(int whichVertex = 0; whichVertex < 3; whichVertex++)
				{
					int index = pObject->pFaces[j].vertIndex[whichVertex];
					glNormal3f(pObject->pNormals[ index ].x, pObject->pNormals[ index ].y, pObject->pNormals[ index ].z);
					if(pObject->bHasTexture) {
						if(pObject->pTexVerts) {
							glTexCoord2f(pObject->pTexVerts[ index ].x, pObject->pTexVerts[ index ].y);
						}
					} else {
						if(g_3DModel.pMaterials.size() && pObject->materialID >= 0) 
						{
							BYTE *pColor = g_3DModel.pMaterials[pObject->materialID].color;
							glColor3ub(pColor[0], pColor[1], pColor[2]);
						}
					}
					glVertex3f(pObject->pVerts[ index ].x, pObject->pVerts[ index ].y, pObject->pVerts[ index ].z);
				}
			}

		glEnd();
  
.........................help......................thx Markus Edited by - Kernoel on November 8, 2001 10:05:32 AM
Advertisement
Sorry guys... i''m so stupid... can''t work if a "}" is missing.......:o(

Thx ;o)

Markus
usually means you are missing a semicolon or curly brace somewhere

"I pity the fool, thug, or soul who tries to take over the world, then goes home crying to his momma."
- Mr. T

This topic is closed to new replies.

Advertisement